ControlRoute class

Route builder with given settings. Using Type as route identifier is recommended.

Properties

hashCode int
The hash code for this object.
no setterinherited
identifier String
Route name. This identifier is typically stored in RouteStore. Check RouteStore.routeIdentifier for more info about Store keys.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildInitializer() WidgetInitializer
init({dynamic args}) Route
Builds Route with specified RouteWidgetBuilder or with default MaterialPageRoute/CupertinoPageRoute. Also identifier and settings are passed to Route as RouteSettings. Given args are passed to Widget.
named(String identifier) ControlRoute
Changes current identifier and returns copy of ControlRoute with new settings..
Initializes RouteHandler with given navigator and this Route provider.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
path({RouteArgFactory? path, RouteArgFactory? query, String? mask}) ControlRoute
Alters current identifier with given path and query args and returns copy of ControlRoute with new settings.
register<T>() → void
Registers this Route to global RouteStore.
toString() String
A string representation of this object.
inherited
viaCupertinoRoute() ControlRoute
Setups new routeBuilder and returns copy of ControlRoute with new settings.. Via CupertinoPageRoute.
viaMaterialRoute() ControlRoute
Setups new routeBuilder and returns copy of ControlRoute with new settings.. Via MaterialPageRoute.
viaRoute(RouteBuilderFactory routeBuilder) ControlRoute
Setups new routeBuilder and returns copy of ControlRoute with new settings..
viaTransition(RouteTransitionFactory transition, [Duration duration = const Duration(milliseconds: 300)]) ControlRoute
Setups new transition with given duration and returns copy of ControlRoute with new settings.. ControlRouteTransition is used as PageRoute.

Operators

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

Static Methods

build<T>({dynamic identifier, required InitWidgetBuilder builder, Object? arguments, String? mask, RouteArgFactory? path, RouteArgFactory? query}) ControlRoute
Builds Route via builder with given identifier and settings. Type or identifier is required - check RouteStore.routeIdentifier for more info about Store keys. mask - specific url mask, that can be used for dynamic routing - check RouteStore.routePathMask for more info. E.g. /project/{pid}/user{uid} settings - Additional Route settings.
identifierOf<T>([dynamic identifier]) String?
Returns identifier of Route stored in RouteStore. Check RouteStore.routeIdentifier for more info about Store keys.
of<T>([dynamic identifier]) ControlRoute?
@{template route-store-get} Returns ControlRoute from RouteStore by given Type or identifier. Type or identifier is required - check RouteStore.routeIdentifier for more info about Store keys.
route<T>({dynamic identifier, required Route route, String? mask, RouteArgFactory? path, RouteArgFactory? query}) ControlRoute
Holds Route with given identifier. Useful for specific or generated Routes.