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
No known key found for this signature in database
GPG key ID: DBA94253E1D3F267
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'),
),
],
),

View file

@ -46,7 +46,7 @@ dependencies:
git:
url: https://github.com/BenjaminHalko/logcat
ref: 4a6d5e0e22292c8eb160cfb9365b9ea29735fd43 # Branch: master
package_info_plus: ^4.2.0
package_info_plus: ^5.0.1
path_provider: ^2.0.14
permission_handler: ^11.0.1
pull_to_refresh: ^2.0.0