diff --git a/lib/background/main_background.dart b/lib/background/main_background.dart index eb990617..6bac550d 100644 --- a/lib/background/main_background.dart +++ b/lib/background/main_background.dart @@ -1,4 +1,5 @@ import 'dart:io'; +import 'dart:ui'; import 'package:cobble/background/modules/apps_background.dart'; import 'package:cobble/background/modules/notifications_background.dart'; @@ -14,16 +15,12 @@ import 'package:cobble/util/container_extensions.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:shared_preferences_android/shared_preferences_android.dart'; -import 'package:shared_preferences_ios/shared_preferences_ios.dart'; import 'actions/master_action_handler.dart'; import 'modules/calendar_background.dart'; void main_background() { - // https://github.com/flutter/flutter/issues/98473#issuecomment-1041895729 - if (Platform.isAndroid) SharedPreferencesAndroid.registerWith(); - if (Platform.isIOS) SharedPreferencesIOS.registerWith(); + DartPluginRegistrant.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized(); BackgroundReceiver();