RouteConfiguration class

The route configuration for GoRouter configured by the app.

Constructors

RouteConfiguration(ValueListenable<RoutingConfig> _routingConfig, {required GlobalKey<NavigatorState> navigatorKey, Codec<Object?, Object?>? extraCodec})
Constructs a RouteConfiguration.

Properties

extraCodec Codec<Object?, Object?>?
The codec used to encode and decode extra into a serializable format.
final
hashCode int
The hash code for this object.
no setterinherited
The global key for top level navigator.
final
redirectLimit int
The limit for the number of consecutive redirects.
no setter
routes List<RouteBase>
The list of top level routes used by GoRouterDelegate.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
topRedirect GoRouterRedirect
Top level page redirect.
no setter

Methods

buildTopLevelGoRouterState(RouteMatchList matchList) GoRouterState
Builds a GoRouterState suitable for top level callback such as GoRouter.redirect or GoRouter.onException.
debugKnownRoutes() String
Returns the full path of routes.
findMatch(Uri uri, {Object? extra}) RouteMatchList
Finds the routes that matched the given URL.
locationForRoute(RouteBase route) String?
Get the location for the provided route.
namedLocation(String name, {Map<String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}}) String
Looks up the url location by a GoRoute's name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redirect(BuildContext context, FutureOr<RouteMatchList> prevMatchListFuture, {required List<RouteMatchList> redirectHistory}) FutureOr<RouteMatchList>
Processes redirects by returning a new RouteMatchList representing the new location.
reparse(RouteMatchList matchList) RouteMatchList
Reparse the input RouteMatchList
toString() String
A string representation of this object.
override

Operators

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