RouteData class

Object that holds information about the active route.

Inside the widget tree you can get the scoped RouteData using context.routeData.

See also NavigationBuilder and RouteWidget

Annotations

Constructors

RouteData({required String path, required String location, required Map<String, String> queryParams, required Map<String, String> pathParams, required dynamic arguments, required bool pathEndsWithSlash, required List<RouteData> redirectedFrom, required String subLocation, required GlobalKey<NavigatorState>? navigatorKey})
Object that holds information about the active route.
RouteData.initial()
factory

Properties

arguments → dynamic
Arguments passed when pushing a route.
final
baseLocation String
The current Base location. Example :
no setter
hashCode int
The hash code for this object.
no setteroverride
location String
The current resolved location.
final
final
path String
The current used route.
final
pathParams Map<String, String>
A map of path parameters extracted from the url link.
final
queryParams Map<String, String>
A map of query parameters extracted from the url link.
final
redirectedFrom RouteData?
Holds the url location the route is redirected from.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signature String
no setter
unKnownRoute Widget
The unknown route widget
no setter
uri Uri
Get the Uri representation of the resolved location
latefinal

Methods

copyWith({String? path, String? location, Map<String, String>? queryParams, Map<String, String>? pathParams, dynamic arguments, List<RouteData>? redirectedFrom, bool? pathEndsWithSlash, String? subLocation, GlobalKey<NavigatorState>? navigationKey}) RouteData
log() → void
log the detailed of the navigation steps.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redirectTo(String? route) → Redirect
redirect to the given route
toString() String
A string representation of this object.
override

Operators

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