Fix crash when a requests fails in non-widget mode (aka on background-receive): Cannot show toasts without an UI
This commit is contained in:
@@ -205,7 +205,7 @@ void main() async {
|
||||
|
||||
final appLaunchNotification = await flutterLocalNotificationsPlugin.getNotificationAppLaunchDetails();
|
||||
if (appLaunchNotification != null) {
|
||||
// Use has launched SCN by clicking on a loca notifiaction, if it was a summary or message notifiaction open the corresponding screen
|
||||
// Use has launched SCN by clicking on a local notifiaction, if it was a summary or message notifiaction open the corresponding screen
|
||||
// This is android only
|
||||
//TODO same on iOS, somehow??
|
||||
ApplicationLog.info('App launched by notification: ${appLaunchNotification.notificationResponse?.id}');
|
||||
@@ -216,6 +216,8 @@ void main() async {
|
||||
|
||||
ApplicationLog.debug('[INIT] Application started');
|
||||
|
||||
Globals().appWidgetInitialized = true;
|
||||
|
||||
runApp(
|
||||
MultiProvider(
|
||||
providers: [
|
||||
|
||||
Reference in New Issue
Block a user