StatefulShellBranch constructor

StatefulShellBranch({
  1. required List<RouteBase> routes,
  2. GlobalKey<NavigatorState>? navigatorKey,
  3. String? initialLocation,
  4. String? restorationScopeId,
  5. List<NavigatorObserver>? observers,
})

Constructs a StatefulShellBranch.

Implementation

StatefulShellBranch({
  required this.routes,
  GlobalKey<NavigatorState>? navigatorKey,
  this.initialLocation,
  this.restorationScopeId,
  this.observers,
}) : navigatorKey = navigatorKey ?? GlobalKey<NavigatorState>() {
  assert(() {
    ShellRouteBase._debugCheckSubRouteParentNavigatorKeys(
        routes, this.navigatorKey);
    return true;
  }());
}