diff --git a/lib/src/routing/app_router.dart b/lib/src/routing/app_router.dart index fa5c7a1b..d88a65bc 100644 --- a/lib/src/routing/app_router.dart +++ b/lib/src/routing/app_router.dart @@ -67,13 +67,14 @@ GoRouter goRouter(GoRouterRef ref) { } final isLoggedIn = authRepository.currentUser != null; if (isLoggedIn) { - if (path.startsWith('/signIn')) { + if (path.startsWith('/signIn') || path.startsWith('/startup')) { return '/jobs'; } } else { if (path.startsWith('/jobs') || path.startsWith('/entries') || - path.startsWith('/account')) { + path.startsWith('/account') || + path.startsWith('/startup')) { return '/signIn'; } } @@ -108,9 +109,9 @@ GoRouter goRouter(GoRouterRef ref) { // Stateful navigation based on: // https://github.com/flutter/packages/blob/main/packages/go_router/example/lib/stateful_shell_route.dart StatefulShellRoute.indexedStack( - builder: (context, state, navigationShell) { - return ScaffoldWithNestedNavigation(navigationShell: navigationShell); - }, + pageBuilder: (context, state, navigationShell) => NoTransitionPage( + child: ScaffoldWithNestedNavigation(navigationShell: navigationShell), + ), branches: [ StatefulShellBranch( navigatorKey: _jobsNavigatorKey, @@ -218,6 +219,8 @@ GoRouter goRouter(GoRouterRef ref) { ], ), ], - errorBuilder: (context, state) => const NotFoundScreen(), + errorPageBuilder: (context, state) => const NoTransitionPage( + child: NotFoundScreen(), + ), ); }