RouterComponent constructor

RouterComponent({
  1. required String initialRoute,
  2. required Map<String, Route> routes,
  3. Map<String, RouteFactory>? routeFactories,
  4. RouteFactory? onUnknownRoute,
  5. ComponentKey? key,
})

Implementation

RouterComponent({
  required this.initialRoute,
  required Map<String, Route> routes,
  Map<String, RouteFactory>? routeFactories,
  this.onUnknownRoute,
  super.key,
})  : _routes = routes,
      _routeFactories = routeFactories ?? {} {
  routes.forEach((name, route) => route.name = name);
}