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

View file

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