FRouter constructor

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

Implementation

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