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:
PapaTutuWawa committed 2022-08-31 12:54:02 +02:00
1 parent 9171f42d09
commit c52bdbecf8
1 file changed
+1
+1
View File
@@ -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());