fixed splashscreen removal

This commit is contained in:
Vadim 2024-11-06 19:03:38 +01:00
parent fce8d0bb6a
commit c8eafd9e2c

View file

@ -51,6 +51,7 @@ class _ApplicationWrapperState extends State<ApplicationWrapper> {
void initState() {
super.initState();
_initFuture = _initialize();
_removeSplashscreen();
}
@override
@ -99,14 +100,20 @@ class _ApplicationWrapperState extends State<ApplicationWrapper> {
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();
});
}
}