diff --git a/lib/router.dart b/lib/router.dart index ca4c7e6f..f5e4f07c 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -31,6 +31,7 @@ class ScreenPaths { /// Routing table, matches string paths to UI Screens, optionally parses params from the paths final appRouter = GoRouter( + redirect: _handleRedirect, routes: [ ShellRoute( builder: (context, router, navigator) { @@ -102,7 +103,7 @@ class AppRoute extends GoRoute { final bool useFade; } -String? _handleRedirect(GoRouterState state) { +String? _handleRedirect(BuildContext context, GoRouterState state) { // Prevent anyone from navigating away from `/` if app is starting up. if (!appLogic.isBootstrapComplete && state.location != ScreenPaths.splash) { return ScreenPaths.splash;