mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
Temporarily comment run app on error of run zone guard
This commit is contained in:
parent
7b99e409a9
commit
51ea377a52
1 changed files with 31 additions and 27 deletions
|
@ -161,34 +161,38 @@ Future<void> main() async {
|
|||
initialMigrationVersion: 17);
|
||||
runApp(App());
|
||||
}, (error, stackTrace) async {
|
||||
print("@@@@@@@@@@@@@@@@");
|
||||
print(error);
|
||||
print(stackTrace);
|
||||
_saveException(error.toString(), stackTrace);
|
||||
final sharedPreferences = await SharedPreferences.getInstance();
|
||||
final theme = ThemeList.deserialize(
|
||||
raw: sharedPreferences.getInt(PreferencesKey.currentTheme) ?? 0);
|
||||
|
||||
final savedLanguageCode =
|
||||
sharedPreferences.getString(PreferencesKey.currentLanguageCode) ??
|
||||
await LanguageService.localeDetection();
|
||||
runApp(
|
||||
MaterialApp(
|
||||
debugShowCheckedModeBanner: true,
|
||||
theme: theme.themeData,
|
||||
localizationsDelegates: [
|
||||
S.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
],
|
||||
supportedLocales: S.delegate.supportedLocales,
|
||||
locale: Locale(savedLanguageCode),
|
||||
home: Scaffold(
|
||||
body: FailurePage(
|
||||
error: error.toString(),
|
||||
stackTrace: stackTrace,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
// TODO: this will trigger even there is no fatal error occurred so better not build a new app instance
|
||||
// final sharedPreferences = await SharedPreferences.getInstance();
|
||||
// final theme = ThemeList.deserialize(
|
||||
// raw: sharedPreferences.getInt(PreferencesKey.currentTheme) ?? 0);
|
||||
//
|
||||
// final savedLanguageCode =
|
||||
// sharedPreferences.getString(PreferencesKey.currentLanguageCode) ??
|
||||
// await LanguageService.localeDetection();
|
||||
// runApp(
|
||||
// MaterialApp(
|
||||
// debugShowCheckedModeBanner: true,
|
||||
// theme: theme.themeData,
|
||||
// localizationsDelegates: [
|
||||
// S.delegate,
|
||||
// GlobalCupertinoLocalizations.delegate,
|
||||
// GlobalMaterialLocalizations.delegate,
|
||||
// GlobalWidgetsLocalizations.delegate,
|
||||
// ],
|
||||
// supportedLocales: S.delegate.supportedLocales,
|
||||
// locale: Locale(savedLanguageCode),
|
||||
// home: Scaffold(
|
||||
// body: FailurePage(
|
||||
// error: error.toString(),
|
||||
// stackTrace: stackTrace,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue