diff --git a/lib/main.dart b/lib/main.dart index b07e69a8e..37e472add 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,11 +18,6 @@ import 'widgets/fluffy_chat_app.dart'; ReceivePort? mainIsolateReceivePort; void main() async { - // Our background push shared isolate accesses flutter-internal things very early in the startup proccess - // To make sure that the parts of flutter needed are started up already, we need to ensure that the - // widget bindings are initialized already. - WidgetsFlutterBinding.ensureInitialized(); - if (PlatformInfos.isAndroid) { final port = mainIsolateReceivePort = ReceivePort(); IsolateNameServer.registerPortWithName( @@ -31,6 +26,11 @@ void main() async { ); } + // Our background push shared isolate accesses flutter-internal things very early in the startup proccess + // To make sure that the parts of flutter needed are started up already, we need to ensure that the + // widget bindings are initialized already. + WidgetsFlutterBinding.ensureInitialized(); + final store = await AppSettings.init(); Logs().i('Welcome to ${AppSettings.applicationName.value} <3');