From 110766d516933fa163d6453793601e63263930b0 Mon Sep 17 00:00:00 2001 From: Shawn Date: Tue, 18 Apr 2023 11:11:24 -0600 Subject: [PATCH] Fix missing redirect --- lib/router.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;