From c8eafd9e2c8fbbfa23f961ebabcad2771da5eead Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:03:38 +0100 Subject: [PATCH] fixed splashscreen removal --- lib/application_wrapper.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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(); + }); } }