diff --git a/lib/providers/apps_provider.dart b/lib/providers/apps_provider.dart index e3b9595..8e8dfa9 100644 --- a/lib/providers/apps_provider.dart +++ b/lib/providers/apps_provider.dart @@ -367,7 +367,7 @@ class AppsProvider with ChangeNotifier { AppsProvider({isBg = false}) { // Subscribe to changes in the app foreground status - foregroundStream = FGBGEvents.stream.asBroadcastStream(); + foregroundStream = FGBGEvents.instance.stream.asBroadcastStream(); foregroundSubscription = foregroundStream?.listen((event) async { isForeground = event == FGBGType.foreground; if (isForeground) { @@ -572,7 +572,7 @@ class AppsProvider with ChangeNotifier { if (!isForeground) { await notificationsProvider.notify(completeInstallationNotification, cancelExisting: true); - while (await FGBGEvents.stream.first != FGBGType.foreground) {} + while (await FGBGEvents.instance.stream.first != FGBGType.foreground) {} await notificationsProvider.cancel(completeInstallationNotification.id); } }