fix: migration latest changes to native buttons

Signed-off-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
validcube
2023-12-23 10:36:59 +07:00
parent c23275f2fe
commit c56c445fb7
2 changed files with 14 additions and 8 deletions

View File

@ -322,24 +322,29 @@ class PatcherAPI {
),
actions: (status == null)
? <Widget>[
CustomMaterialButton(
label: I18nText('okButton'),
FilledButton(
onPressed: () async {
Navigator.pop(context);
},
child: I18nText('okButton'),
),
]
: <Widget>[
CustomMaterialButton(
isFilled: !isFixable,
label: I18nText('cancelButton'),
if (!isFixable)
FilledButton(
onPressed: () {
Navigator.pop(context);
},
child: I18nText('cancelButton'),
),
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: I18nText('cancelButton'),
),
if (isFixable)
CustomMaterialButton(
label: I18nText('okButton'),
FilledButton(
onPressed: () async {
final int response = await patcherChannel.invokeMethod(
'uninstallApp',
@ -350,6 +355,7 @@ class PatcherAPI {
Navigator.pop(context);
}
},
child: I18nText('okButton'),
),
],
),