diff --git a/lib/router/router.dart b/lib/router/router.dart index f6ae5826..487c4682 100644 --- a/lib/router/router.dart +++ b/lib/router/router.dart @@ -59,7 +59,8 @@ GoRouter router(Ref ref) { debugLogDiagnostics: kDebugMode, refreshListenable: router, routes: router._routes, - navigatorKey: navigatorKey); + navigatorKey: navigatorKey, + onException: (context, state, router) => router.go(initLocation),); } @riverpod