FRouter.ofUriTemplates constructor

FRouter.ofUriTemplates({
  1. NavigatorOf? navigatorOf,
  2. AppRoute<dynamic, RouteParams>? notFoundRoute,
  3. RouterFactory routeFactory = const DefaultRouterFactory(),
})

Implementation

FRouter.ofUriTemplates({
  NavigatorOf? navigatorOf,
  this.notFoundRoute,
  this.routeFactory = const DefaultRouterFactory(),
})  : _routeTree = RouteTree(ParameterExtractorType.uriTemplate),
      navigatorOf = navigatorOf ??
          ((context, rootNavigator) =>
              Navigator.of(context, rootNavigator: rootNavigator)) {
  if (notFoundRoute != null) {
    this.register(notFoundRoute!);
  }
}