Skip to content

Commit

Permalink
fix: migration latest changes to native buttons
Browse files Browse the repository at this point in the history
Signed-off-by: validcube <pun.butrach@gmail.com>
  • Loading branch information
validcube committed Dec 23, 2023
1 parent c23275f commit c56c445
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions lib/services/patcher_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -350,6 +355,7 @@ class PatcherAPI {
Navigator.pop(context);
}
},
child: I18nText('okButton'),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c56c445

Please sign in to comment.