ShellRoute constructor
ShellRoute({
- ShellRouteBuilder? builder,
- ShellRoutePageBuilder? pageBuilder,
- List<
NavigatorObserver> ? observers, - required List<
RouteBase> routes, - String? restorationScopeId,
Constructs a ShellRoute.
Implementation
ShellRoute({
this.builder,
this.pageBuilder,
this.observers,
required super.routes,
super.parentNavigatorKey,
GlobalKey<NavigatorState>? navigatorKey,
this.restorationScopeId,
}) : assert(routes.isNotEmpty),
navigatorKey = navigatorKey ?? GlobalKey<NavigatorState>(),
super._() {
assert(() {
ShellRouteBase._debugCheckSubRouteParentNavigatorKeys(
routes, this.navigatorKey);
return true;
}());
}