chore: set main isolate port even earlier
This commit is contained in:
parent
92fcfacfc4
commit
ae11d5b47f
1 changed files with 5 additions and 5 deletions
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue