diff --git a/lib/application_wrapper.dart b/lib/application_wrapper.dart index e3bd928..611e1f7 100644 --- a/lib/application_wrapper.dart +++ b/lib/application_wrapper.dart @@ -51,6 +51,7 @@ class _ApplicationWrapperState extends State { void initState() { super.initState(); _initFuture = _initialize(); + _removeSplashscreen(); } @override @@ -99,14 +100,20 @@ class _ApplicationWrapperState extends State { SharedPreferences.getInstance(), const LightSensorService(LocalPlatform()).hasSensor(), remoteConfigService.activeAndFetchFeatures(), + equipmentProfilesStorageService.init(), filmsStorageService.init(), ]).then((value) { userPreferencesService = UserPreferencesService((value[0] as SharedPreferences?)!); hasLightSensor = value[1] as bool? ?? false; }); - await Future.wait([ + } + + void _removeSplashscreen() { + Future.wait([ equipmentProfilesStorageServiceCompleter.future, filmsStorageServiceCompleter.future, - ]).then((_) => FlutterNativeSplash.remove()); + ]).then((_) { + FlutterNativeSplash.remove(); + }); } }