Initialize in main
This commit is contained in:
parent
c6375d0a7c
commit
dd164e95ea
4 changed files with 56 additions and 73 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_background_geolocation/flutter_background_geolocation.dart' as bg;
|
||||
|
||||
import 'main_screen.dart';
|
||||
import 'preferences.dart';
|
||||
|
|
@ -7,6 +8,7 @@ import 'preferences.dart';
|
|||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await Preferences.init();
|
||||
await bg.BackgroundGeolocation.ready(Preferences.geolocationConfig());
|
||||
runApp(const MainApp());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue