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:
2025-05-23 21:10:20 +02:00
parent cc13f8a0f3
commit faa624e9f8
5 changed files with 56 additions and 14 deletions

View File

@@ -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: [