From ae11d5b47f121e95c4b43d2ea566ba5b18191455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ku=C3=9Fowski?= Date: Tue, 11 Nov 2025 16:24:51 +0100 Subject: [PATCH] chore: set main isolate port even earlier --- lib/main.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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');