diff --git a/example/lib/main.dart b/example/lib/main.dart index 0a1ed31..f45c1d9 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -24,13 +24,6 @@ class Home extends StatelessWidget { startNavigatorUserStory(config, context); } -final _router = GoRouter( - initialLocation: '/splashScreen', - routes: [ - ...getStartRoutes(), - ], -); - List getStartRoutes() => getStartStoryRoutes( config, ); @@ -40,7 +33,7 @@ StartUserStoryConfiguration config = StartUserStoryConfiguration( ExampleIntroductionDataProvider(), ), useKillswitch: true, - // showIntroduction: false, + showIntroduction: true, splashScreenBuilder: (context, onFinish) => SplashScreen( onFinish: onFinish, ), diff --git a/lib/src/models/start_configuration.dart b/lib/src/models/start_configuration.dart index 9c1bcc2..29437f8 100644 --- a/lib/src/models/start_configuration.dart +++ b/lib/src/models/start_configuration.dart @@ -13,7 +13,6 @@ class StartUserStoryConfiguration { this.introductionFallbackScreen, this.introductionScrollPhysics, this.showIntroduction = true, - this.alwaysShowIntroduction = false, this.useKillswitch = false, this.minimumSplashScreenDuration = 3, this.splashScreenFuture, @@ -47,9 +46,6 @@ class StartUserStoryConfiguration { /// If the introduction should be shown. final bool showIntroduction; - /// If this is true the introduction will always be shown. - final bool alwaysShowIntroduction; - /// If the killswitch is enabled this app can be remotely disabled. final bool useKillswitch; diff --git a/lib/src/user_stories/flutter_start_userstory_go_router.dart b/lib/src/user_stories/flutter_start_userstory_go_router.dart index 2557c29..c277a4d 100644 --- a/lib/src/user_stories/flutter_start_userstory_go_router.dart +++ b/lib/src/user_stories/flutter_start_userstory_go_router.dart @@ -53,8 +53,7 @@ List getStartStoryRoutes( if (configuration.useKillswitch && !isAllowedToPassThrough) return; - if (!configuration.showIntroduction || - (introductionSeen && !configuration.alwaysShowIntroduction)) { + if (!configuration.showIntroduction || introductionSeen) { return go( configuration.homeScreenRoute ?? StartUserStoryRoutes.home, ); diff --git a/lib/src/user_stories/flutter_start_userstory_navigator.dart b/lib/src/user_stories/flutter_start_userstory_navigator.dart index 33d0bd8..708e3ac 100644 --- a/lib/src/user_stories/flutter_start_userstory_navigator.dart +++ b/lib/src/user_stories/flutter_start_userstory_navigator.dart @@ -49,8 +49,7 @@ Widget _splashScreen( if (configuration.useKillswitch && !isAllowedToPassThrough) return; - if (!configuration.showIntroduction || - (introductionSeen && !configuration.alwaysShowIntroduction)) { + if (!configuration.showIntroduction || introductionSeen) { await navigator.pushReplacement( MaterialPageRoute( builder: (context) => _home(configuration, context),