1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 21:09:21 +00:00

Finish to fix deprecation warnings

This commit is contained in:
Pierre HUBERT 2021-03-13 15:42:19 +01:00
parent ad2cf6d4f9
commit 2a00530126
3 changed files with 9 additions and 15 deletions

View File

@ -72,21 +72,23 @@ class _FriendshipStatusWidgetState extends State<FriendshipStatusWidget> {
if (widget.status.receivedRequest) { if (widget.status.receivedRequest) {
return Column( return Column(
children: <Widget>[ children: <Widget>[
RaisedButton( ElevatedButton(
child: Text( child: Text(
tr("Accept request").toUpperCase(), tr("Accept request").toUpperCase(),
style: WhiteTextColorStyle, style: WhiteTextColorStyle,
), ),
color: Colors.green, style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.green)),
onPressed: () => executeRequest( onPressed: () => executeRequest(
() => _friendsHelper.respondRequest(friendID, true)), () => _friendsHelper.respondRequest(friendID, true)),
), ),
RaisedButton( ElevatedButton(
child: Text( child: Text(
tr("Reject request").toUpperCase(), tr("Reject request").toUpperCase(),
style: WhiteTextColorStyle, style: WhiteTextColorStyle,
), ),
color: Colors.red, style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.red)),
onPressed: () => executeRequest( onPressed: () => executeRequest(
() => _friendsHelper.respondRequest(friendID, false)), () => _friendsHelper.respondRequest(friendID, false)),
) )

View File

@ -20,9 +20,7 @@ import 'package:image_picker/image_picker.dart';
/// @author Pierre HUBERT /// @author Pierre HUBERT
const _ActiveButtonsColor = Colors.blue; const _ActiveButtonsColor = Colors.blue;
const _ActiveButtonsTextColor = Colors.white;
const _InactiveButtonsColor = Colors.grey; const _InactiveButtonsColor = Colors.grey;
const _InactiveButtonsTextColor = Colors.black;
class PostCreateFormWidget extends StatefulWidget { class PostCreateFormWidget extends StatefulWidget {
final PostTarget postTarget; final PostTarget postTarget;
@ -192,14 +190,9 @@ class _PostCreateFormWidgetState extends State<PostCreateFormWidget> {
// Submit post button // Submit post button
_isCreating _isCreating
? Container() ? Container()
: FlatButton( : ElevatedButton(
child: Text(tr("Send").toUpperCase()), child: Text(tr("Send").toUpperCase()),
onPressed: canSubmitForm ? _submitForm : null, onPressed: canSubmitForm ? _submitForm : null),
color: _ActiveButtonsColor,
textColor: _ActiveButtonsTextColor,
disabledColor: _InactiveButtonsColor,
disabledTextColor: _InactiveButtonsTextColor,
),
], ],
), ),
) )

View File

@ -99,8 +99,7 @@ class _ConversationWindowState extends SafeState<ConversationWindow> {
isCollapsed: _collapsed, isCollapsed: _collapsed,
body: buildErrorCard(tr("Could not load conversation information!"), body: buildErrorCard(tr("Could not load conversation information!"),
actions: [ actions: [
FlatButton( ElevatedButton(
textColor: Colors.white,
onPressed: _refresh, onPressed: _refresh,
child: Text(tr("Try again").toUpperCase()), child: Text(tr("Try again").toUpperCase()),
) )