goRouter top-level property
final
Implementation
final goRouter = GoRouter(
errorBuilder: (context, state) => NotFoundPage(routerState: state),
navigatorKey: rootNavKey,
initialLocation: Routes.main.route,
restorationScopeId: 'acter-routes',
routes: [
...generalRoutes,
StatefulShellRoute.indexedStack(
parentNavigatorKey: rootNavKey,
builder: (
BuildContext context,
GoRouterState state,
StatefulNavigationShell navigationShell,
) {
return AppShell(key: appShellKey, navigationShell: navigationShell);
},
branches: shellBranches,
),
],
);