FRouter class Null safety

Available Extensions


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


hashCode int
The hash code for this object. [...]
read-only, inherited
Produces a navigator given a BuildContext. Can be overridden to use a globalKey or some other navigator mechanism.
read / write
notFoundRoute AppRoute<dynamic, RouteParams>?
Generic handler for when a route has not been defined
paths List<String>
routeFactory RouterFactory
Converts an AppRoute and parameters into a Route that can be used with a navigator
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


define<R>(String routePath, {String? name, required WidgetHandler<R, RouteParams>? handler, TransitionType? transitionType}) AppRoute<R, RouteParams>
Creates an AppPageRoute definition whose arguments are Map<String, dynamic>
defineCompletable<R>(String routePath, {String? name, required CompletableHandler<R, RouteParams> handler}) AppRoute<R, RouteParams>
Creates a CompletableAppRoute definition.
defineWithParams<R, P extends RouteParams>(String routePath, {required WidgetHandler<R, P> handler, String? name, required ParameterConverter<P> paramConverter, TransitionType? transitionType}) AppRoute<R, P>
Creates an AppPageRoute definition for the passed WidgetHandler, using a custom parameter type
findRouteByUriTemplate(String? uriTemplate) AppRoute<dynamic, RouteParams>?
Returns an appRoute using only a uriTemplate. This does not attempt to parse any parameters
matchRoute(String? path) AppRouteMatch<dynamic, RouteParams>?
Finds a defined AppRoute for the path value, or null if none could be found
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
printTree({bool logToConsole = true}) String
Prints the route tree so you can analyze it.
register<R, P extends RouteParams, A extends AppRoute<R, P>>(A route) → A
Registers a pre-built AppRoute
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]

Static Properties

routes FRouter