diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard index f2e259c7..6fcdab84 100644 --- a/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -14,12 +16,14 @@ + + - + @@ -28,10 +32,10 @@ - + - + diff --git a/lib/app.dart b/lib/app.dart index a5b8e76d..e35d8108 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -189,7 +189,7 @@ class HyphaAppView extends StatelessWidget { theme: HyphaTheme.lightTheme, themeMode: state.themeMode, navigatorObservers: [GetIt.I.get().firebaseObserver], - home: const SplashPage(), + home: const SizedBox.shrink(), ); }, ), diff --git a/lib/ui/blocs/authentication/authentication_bloc.freezed.dart b/lib/ui/blocs/authentication/authentication_bloc.freezed.dart index 85a9bd12..1e49f28f 100644 --- a/lib/ui/blocs/authentication/authentication_bloc.freezed.dart +++ b/lib/ui/blocs/authentication/authentication_bloc.freezed.dart @@ -1175,7 +1175,7 @@ class __$$_AuthenticationStateCopyWithImpl<$Res> class _$_AuthenticationState implements _AuthenticationState { const _$_AuthenticationState( - {this.authStatus = const UnAuthenticated(), + {this.authStatus = const Unknown(), this.userProfileData, this.userAuthData}); diff --git a/lib/ui/blocs/authentication/authentication_state.dart b/lib/ui/blocs/authentication/authentication_state.dart index 638f3ed6..22bfc406 100644 --- a/lib/ui/blocs/authentication/authentication_state.dart +++ b/lib/ui/blocs/authentication/authentication_state.dart @@ -3,7 +3,7 @@ part of 'authentication_bloc.dart'; @freezed class AuthenticationState with _$AuthenticationState { const factory AuthenticationState({ - @Default(UnAuthenticated()) AuthenticationStatus authStatus, + @Default(Unknown()) AuthenticationStatus authStatus, UserProfileData? userProfileData, UserAuthData? userAuthData, }) = _AuthenticationState; diff --git a/lib/ui/splash/splash_page.dart b/lib/ui/splash/splash_page.dart index 0cc513fd..76a29bc9 100644 --- a/lib/ui/splash/splash_page.dart +++ b/lib/ui/splash/splash_page.dart @@ -33,31 +33,29 @@ class _SplashPageState extends State with TickerProviderStateMixin { @override Widget build(BuildContext context) { return Scaffold( - extendBodyBehindAppBar: true, - body: Lottie.asset( - fit: BoxFit.fill, - 'assets/animations/hypha_splash.json', - controller: _controller, - height: MediaQuery.of(context).size.height * 1, - width: MediaQuery.of(context).size.width * 1, - animate: true, - onLoaded: (composition) { - _controller - ..duration = composition.duration - ..forward().whenComplete(() { - final userAuthData = GetIt.I.get().currentAuthStatus; - if (userAuthData is Authenticated) { - if (Get.currentRoute != '/HyphaBottomNavigation') { - Get.offAll(() => const HyphaBottomNavigation()); - } - } else { - if (Get.currentRoute != '/OnboardingPage') { - Get.offAll(() => const OnboardingPage()); - } - } - }); - }, - ), - ); + extendBodyBehindAppBar: true, + body: Container( + height: MediaQuery.of(context).size.height * 1, + width: MediaQuery.of(context).size.width * 1, + child: FittedBox( + fit: BoxFit.cover, + child: Lottie.asset('assets/animations/hypha_splash.json', controller: _controller, animate: true, + onLoaded: (composition) { + _controller + ..duration = composition.duration + ..forward().whenComplete(() { + final userAuthData = GetIt.I.get().currentAuthStatus; + if (userAuthData is Authenticated) { + if (Get.currentRoute != '/HyphaBottomNavigation') { + Get.offAll(() => const HyphaBottomNavigation()); + } + } else { + if (Get.currentRoute != '/OnboardingPage') { + Get.offAll(() => const OnboardingPage()); + } + } + }); + })), + )); } }