NamedRoute class

A named route that can be used to navigate to a named destination typically built with NamedRouteDef

Inheritance

Constructors

NamedRoute.new(String name, {List<PageRouteInfo<Object?>>? children, Object? args, Map<String, dynamic> params = const {}, Map<String, dynamic> queryParams = const {}, String? fragment})
Default constructor
const

Properties

args Object?
The typed arguments of the route
finalinherited
argsEquality bool
Whether the equality check should include args
finalinherited
flattened List<PageRouteInfo<Object?>>
Returns a flattened list of this route and it's sub-routes e.g if we have = Route1[Route2Route3] the result is Route1,Route2,Route3
no setterinherited
fragment String
The fragment of the Uri.fragment
finalinherited
fromRedirect bool
Whether is route is redirected from other route
no setterinherited
hasChildren bool
Whether this route has initial child routes
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
initialChildren List<PageRouteInfo<Object?>>?
The list of initial route entries to be matched by the sub-router when it's created
finalinherited
pathParams Parameters
Builds and returns a new instance of Parameters with rawPathParams
no setterinherited
queryParams Parameters
Builds and returns a new instance of Parameters with rawQueryParams
no setterinherited
rawPathParams Map<String, dynamic>
Route page parameters can be marked as a PathParam, and when this entity is generated it generates a corresponding parameter that's passed to this map so it can be used to build the url later on
finalinherited
rawQueryParams Map<String, dynamic>
Route page parameters can be marked as a QueryParam, and when this entity is generated it generates a corresponding parameter that's passed to this map so it can be used to build the url later on
finalinherited
redirectedFrom String?
Takes the value of RouteMatch.redirectedFrom this is only populated it's build from match PageRouteInfo.fromMatch
finalinherited
routeName String
The name of the route
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringMatch String?
The string match from the RouteMatch
finalinherited

Methods

copyWith({String? name, String? path, Object? args, RouteMatch? match, Map<String, dynamic>? params, Map<String, dynamic>? queryParams, List<PageRouteInfo<Object?>>? children, String? fragment}) PageRouteInfo<Object?>
Returns a new instance with the provided overrides
inherited
match(BuildContext context) RouteMatch?
Returns the match result of this route which internally calls router.matcher.matchByRoute
inherited
Calls StackRouter.navigate with this route on the nearest router
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
push<E>(BuildContext context) Future<E?>
Calls StackRouter.push with this route on the nearest router
inherited
toString() String
A string representation of this object.
inherited

Operators

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