FRouter class

Available Extensions

Constructors

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()})

Properties

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

Methods

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 nonexistent method or property is accessed.
inherited
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.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

routes FRouter
final