Fix missing redirect

This commit is contained in:
Shawn 2023-04-18 11:11:24 -06:00
parent 3080f8d867
commit 110766d516

View File

@ -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;