1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Continue to fix deprecation warnings

This commit is contained in:
2021-03-13 15:38:43 +01:00
parent 230cb2c018
commit ad2cf6d4f9
8 changed files with 22 additions and 23 deletions

View File

@ -20,7 +20,7 @@ Future<PickedFile> pickImage(BuildContext context) async {
title: Text(tr("Choose an image")),
actions: <Widget>[
//Gallery
FlatButton(
TextButton(
onPressed: () => Navigator.pop(context, _ChooseImageSource.GALLERY),
child: Text(
tr("Image gallery").toUpperCase(),
@ -28,7 +28,7 @@ Future<PickedFile> pickImage(BuildContext context) async {
),
// Camera
FlatButton(
TextButton(
onPressed: () => Navigator.pop(context, _ChooseImageSource.CAMERA),
child: Text(
tr("Camera").toUpperCase(),

View File

@ -62,7 +62,7 @@ Future<PostVisibilityLevel> showPostVisibilityPicker({
// Dialog actions
actions: <Widget>[
// Cancel
FlatButton(
TextButton(
child: Text(tr("Cancel").toUpperCase()),
onPressed: () => Navigator.pop(c, null),
),

View File

@ -169,11 +169,11 @@ class __InputTextDialogState extends State<_InputTextDialog> {
),
),
actions: <Widget>[
FlatButton(
TextButton(
child: Text(tr("Cancel").toUpperCase()),
onPressed: () => Navigator.pop(c, false),
),
FlatButton(
TextButton(
child: Text(tr("OK")),
onPressed: widget.controller.text.length >= widget.minLength
? () => Navigator.pop(c, true)
@ -203,11 +203,11 @@ Future<bool> showConfirmDialog({
title: Text(title),
content: Text(message),
actions: <Widget>[
FlatButton(
TextButton(
onPressed: () => Navigator.pop(context, false),
child: Text(tr("Cancel").toUpperCase()),
),
FlatButton(
TextButton(
onPressed: () => Navigator.pop(context, true),
child: Text(
tr("Confirm").toUpperCase(),