From c56c445fb7bcce9e160ae3dbaff9068f62dab34c Mon Sep 17 00:00:00 2001 From: validcube Date: Sat, 23 Dec 2023 10:36:59 +0700 Subject: [PATCH] fix: migration latest changes to native buttons Signed-off-by: validcube --- lib/services/patcher_api.dart | 20 +++++++++++++------- pubspec.yaml | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/services/patcher_api.dart b/lib/services/patcher_api.dart index a22c610b..fda603d9 100644 --- a/lib/services/patcher_api.dart +++ b/lib/services/patcher_api.dart @@ -322,24 +322,29 @@ class PatcherAPI { ), actions: (status == null) ? [ - CustomMaterialButton( - label: I18nText('okButton'), + FilledButton( onPressed: () async { Navigator.pop(context); }, + child: I18nText('okButton'), ), ] : [ - 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'), ), ], ), diff --git a/pubspec.yaml b/pubspec.yaml index 9b1af650..8384ee21 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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