Fix intro routing bug
This commit is contained in:
@@ -40,6 +40,7 @@ GoRouter router(RouterRef ref) {
|
|||||||
debugLogDiagnostics: true,
|
debugLogDiagnostics: true,
|
||||||
routes: [
|
routes: [
|
||||||
if (useMobileRouter) $mobileWrapperRoute else $desktopWrapperRoute,
|
if (useMobileRouter) $mobileWrapperRoute else $desktopWrapperRoute,
|
||||||
|
$introRoute,
|
||||||
],
|
],
|
||||||
refreshListenable: notifier,
|
refreshListenable: notifier,
|
||||||
redirect: notifier.redirect,
|
redirect: notifier.redirect,
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ GlobalKey<NavigatorState>? _dynamicRootKey =
|
|||||||
|
|
||||||
@TypedShellRoute<MobileWrapperRoute>(
|
@TypedShellRoute<MobileWrapperRoute>(
|
||||||
routes: [
|
routes: [
|
||||||
TypedGoRoute<IntroRoute>(path: "/intro", name: IntroRoute.name),
|
|
||||||
TypedGoRoute<HomeRoute>(
|
TypedGoRoute<HomeRoute>(
|
||||||
path: "/",
|
path: "/",
|
||||||
name: HomeRoute.name,
|
name: HomeRoute.name,
|
||||||
@@ -89,7 +88,6 @@ class MobileWrapperRoute extends ShellRouteData {
|
|||||||
|
|
||||||
@TypedShellRoute<DesktopWrapperRoute>(
|
@TypedShellRoute<DesktopWrapperRoute>(
|
||||||
routes: [
|
routes: [
|
||||||
TypedGoRoute<IntroRoute>(path: "/intro", name: IntroRoute.name),
|
|
||||||
TypedGoRoute<HomeRoute>(
|
TypedGoRoute<HomeRoute>(
|
||||||
path: "/",
|
path: "/",
|
||||||
name: HomeRoute.name,
|
name: HomeRoute.name,
|
||||||
@@ -149,6 +147,7 @@ class DesktopWrapperRoute extends ShellRouteData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TypedGoRoute<IntroRoute>(path: "/intro", name: IntroRoute.name)
|
||||||
class IntroRoute extends GoRouteData {
|
class IntroRoute extends GoRouteData {
|
||||||
const IntroRoute();
|
const IntroRoute();
|
||||||
static const name = "Intro";
|
static const name = "Intro";
|
||||||
|
|||||||
Reference in New Issue
Block a user