RouteData<R> 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.new({required RouteMatch route, required RoutingController router, Completer<
R?> ? popCompleter, RouteData? parent, required Key stackKey, required List<RouteMatch> pendingChildren, required RouteType type}) - Default constructor
Properties
-
animationCompletion
→ Future<
void> ? -
Returns the current animation completion future
if the current route is animating
no setter
- 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
- matchId → LocalKey
-
Helper to access RouteMatch.id
no setter
-
meta
→ Map<
String, dynamic> -
Helper to access RouteMatch.meta
no setter
- name → String
-
Helper to access RouteMatch.name
no setter
- params → Parameters
-
Helper to access RouteMatch.params
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.params
no setter
-
pendingChildren
→ List<
RouteMatch> -
The pre-matched sub-routes of this route
no setter
-
popped
→ Future<
R?> -
The pop completer that's used in navigation actions
e.g StackRouter.push
it completes when the built route is popped
no setter
- queryParams → Parameters
-
Helper to access RouteMatch.queryParams
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 CupertinoNavigationBarno setter - topMatch → RouteMatch
-
Returns the top most RouteMatch in the
pending children, if it has not pending children
this
_match
is returnedno 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
-
buildPage<
T> () → AutoRoutePage< T> - Builds the AutoRoutePage page
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPopInvoked(
R? result) → void - Completes the pop completer with the given result
-
setAnimation(
Animation? animation) → void - The main animation that is used by the Route
-
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