ActivityShellBranch constructor

ActivityShellBranch({
  1. required List<ActivityRouteBase> routes,
  2. GlobalKey<NavigatorState>? navigatorKey,
  3. String? initialLocation,
  4. String? restorationScopeId,
  5. List<NavigatorObserver> observers = const [],
})

Implementation

ActivityShellBranch({
  required List<ActivityRouteBase> routes,
  GlobalKey<NavigatorState>? navigatorKey,
  this.initialLocation,
  this.restorationScopeId,
  this.observers = const [],
}) : routes = List.unmodifiable(routes),
     navigatorKey = navigatorKey ?? GlobalKey<NavigatorState>() {
  if (routes.isEmpty) throw ArgumentError('A shell branch needs routes');
}