feat: Prompt for new update

This commit is contained in:
Blazebrain 2023-08-04 01:59:50 +01:00
parent 8996a46784
commit b7b7e816e6
3 changed files with 15 additions and 1 deletions

View file

@ -38,6 +38,7 @@ import 'package:uni_links/uni_links.dart';
import 'package:cw_core/unspent_coins_info.dart';
import 'package:cake_wallet/monero/monero.dart';
import 'package:cake_wallet/wallet_type_utils.dart';
import 'package:upgrader/upgrader.dart';
final navigatorKey = GlobalKey<NavigatorState>();
final rootKey = GlobalKey<RootState>();
@ -285,7 +286,17 @@ class AppState extends State<App> with SingleTickerProviderStateMixin {
locale: Locale(settingsStore.languageCode),
onGenerateRoute: (settings) => Router.createRoute(settings),
initialRoute: initialRoute,
home: _Home(),
//Adding this to override the app theme in this alert that
// upgrader shows. The app theme converts the color to white
// so the text is not visible, this overrides that
// while still keeping everything else intact
home: Theme(
data: ThemeData(),
child: UpgradeAlert(
upgrader: Upgrader(debugDisplayAlways: true),
child: _Home(),
),
),
));
});
}

View file

@ -12,6 +12,7 @@ import devicelocale
import flutter_secure_storage_macos
import in_app_review
import package_info
import package_info_plus
import path_provider_foundation
import platform_device_id
import platform_device_id_macos
@ -28,6 +29,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin"))
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
PlatformDeviceIdMacosPlugin.register(with: registry.registrar(forPlugin: "PlatformDeviceIdMacosPlugin"))
PlatformDeviceIdMacosPlugin.register(with: registry.registrar(forPlugin: "PlatformDeviceIdMacosPlugin"))

View file

@ -82,6 +82,7 @@ dependencies:
path_provider_android: 2.0.24
shared_preferences_android: 2.0.17
url_launcher_android: 6.0.24
upgrader: ^6.5.0
bitcoin_flutter:
git:
url: https://github.com/cake-tech/bitcoin_flutter.git