service: Make the entrypoint a VM entrypoint
Should help with Flutter optimizing the function away. Based on https://github.com/ekasetiawans/flutter_background_service/commit/6c353dd4fc65818ffde3fdcd8364604ceaff569b.
This commit is contained in:
1 parent
9171f42d09
commit
c52bdbecf8
1 file changed
+1
@@ -147,6 +147,7 @@ Future<void> initUDPLogger() async {
|
||||
}
|
||||
|
||||
/// The entrypoint for all platforms after the platform specific initilization is done.
|
||||
@pragma('vm:entry-point')
|
||||
Future<void> entrypoint() async {
|
||||
// Register the lock
|
||||
GetIt.I.registerSingleton<Completer<void>>(Completer());
|
||||
|
||||
Reference in new issue
Block a user