1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-26 12:58:51 +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) {
return Column(
children: <Widget>[
RaisedButton(
ElevatedButton(
child: Text(
tr("Accept request").toUpperCase(),
style: WhiteTextColorStyle,
),
color: Colors.green,
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.green)),
onPressed: () => executeRequest(
() => _friendsHelper.respondRequest(friendID, true)),
),
RaisedButton(
ElevatedButton(
child: Text(
tr("Reject request").toUpperCase(),
style: WhiteTextColorStyle,
),
color: Colors.red,
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.red)),
onPressed: () => executeRequest(
() => _friendsHelper.respondRequest(friendID, false)),
)

View File

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

View File

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