mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-21 23:10:40 +00:00
fixed splashscreen removal
This commit is contained in:
parent
fce8d0bb6a
commit
c8eafd9e2c
1 changed files with 9 additions and 2 deletions
|
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue