NavigatorModule constructor

NavigatorModule({
  1. Key? key,
  2. required Map<String, RouteBuilder> routes,
  3. String? initialRoute,
  4. List<NavigatorObserver> observers = const <NavigatorObserver>[],
  5. RouteBuilder? onUnknownRoute,
  6. GlobalKey<NavigatorState>? navigatorKey,
})

Implementation

NavigatorModule({
  Key? key,
  required this.routes,
  this.initialRoute,
  this.observers = const <NavigatorObserver>[],
  this.onUnknownRoute,
  this.navigatorKey,
}) :
  assert(observers != null),
  assert(
    routes.containsKey('/'),
    'A Routes Map for NavigatorModule '
    'doesn\'t contains a builder with key \'/\', '
    'Note that it does to define a root route'),
  super(key: key);