RouteData class

Holds final information of presented routes That's consumed by AutoRoutePage

It's also scoped by RouteDataScope to be used by clients e.g RouteData.of(context).name

It also tracks ancestors by taking in a parent-route

Constructors

RouteData({required RouteMatch route, required RoutingController router, RouteData? parent, required Key stackKey, required List<RouteMatch> pendingChildren, required RouteType type})
Default constructor

Properties

args Object?
Helper to access RouteMatch.args
no setter
The track to the very first ancestor match
no setter
fragment String
Helper to access RouteMatch.fragment
no setter
hashCode int
The hash code for this object.
no setterinherited
hasPendingChildren bool
Whether this route has pending children
no setter
inheritedPathParams Parameters
Collects all path params form all previous ancestors
no setter
isActive bool
Whether is route is in the visible url-segments
no setter
key LocalKey
The key used by AutoRoutePage.canUpdate
no setter
match String
Helper to access RouteMatch.stringMatch
no setter
meta Map<String, dynamic>
Helper to access RouteMatch.meta
no setter
name String
Helper to access RouteMatch.name
no setter
parent RouteData?
Returns the parent RouteData of this instance
no setter
path String
Helper to access RouteMatch.path
no setter
pathParams Parameters
Helper to access RouteMatch.pathParams
no setter
pendingChildren List<RouteMatch>
The pre-matched sub-routes of this route
final
queryParams Parameters
Helper to access RouteMatch.queryParams
no setter
restorationId String
Builds a String value that that's passed to AutoRoutePage.restorationId
no setter
route RouteMatch
Reruns the raw RouteMatch
no setter
router RoutingController
The router this instance was created by
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackKey Key
The virtual stack-key this route is a part of
final
title String Function(BuildContext context)
Builds page title that's passed to _PageBasedCupertinoPageRoute.title where it can be used by CupertinoNavigationBar
no setter
topMatch RouteMatch
Returns the top most RouteMatch in the pending children, if it has not pending children this _match is returned
no setter
type RouteType
The type of PageRoute this entity will be attached to
final

Methods

argsAs<T>({T orElse()?}) → T
Validates and returns args casted as T
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

of(BuildContext context) RouteData
Looks up and returns the scoped instance