DVRouter class

Inheritance

Constructors

DVRouter({required List<RouteBase> routes, GoRouterRedirect? redirect, int redirectLimit = 5, GoRouterWidgetBuilder? errorBuilder, GoRouterPageBuilder? errorPageBuilder, GoExceptionHandler? onException, Listenable? refreshListenable, String? initialLocation, Object? initialExtra, List<NavigatorObserver>? observers, bool debugLogDiagnostics = false, GlobalKey<NavigatorState>? navigatorKey, String? restorationScopeId, bool requestFocus = true, WidgetBuilder? pending})

Properties

backButtonDispatcher → BackButtonDispatcher
The BackButtonDispatcher that is used to configure the Router.
finalinherited
configuration ↔ RouteConfiguration
The route configuration used in go_router.
latefinalinherited
hashCode → int
The hash code for this object.
no setterinherited
overridePlatformDefaultLocation → bool
Whether to ignore platform's default initial location when initialLocation is set.
finalinherited
pending → WidgetBuilder?
What to paint while the first location resolves. DVRoutePending when null.
final
routeInformationParser ↔ GoRouteInformationParser
The route information parser used by GoRouter.
getter/setter pairoverride
routeInformationProvider ↔ GoRouteInformationProvider
The route information provider used by GoRouter.
latefinalinherited
routerDelegate ↔ GoRouterDelegate
The router delegate. Provide this to the MaterialApp or CupertinoApp's .router() constructor
getter/setter pairoverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → GoRouterState
The top GoRouterState, the state of the route that was last used in either GoRouter.go or GoRouter.push.
no setterinherited

Methods

canPop() → bool
Returns true if there is at least two or more route can be pop.
inherited
dispose() → void
Disposes resource created by this object.
inherited
go(String location, {Object? extra}) → void
Navigate to a URI location w/ optional query parameters, e.g. /family/f2/person/p1?color=blue
inherited
goNamed(String name, {Map<String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}, Object? extra, String? fragment}) → void
Navigate to a named route w/ optional parameters, e.g. name='person', pathParameters={'fid': 'f2', 'pid': 'p1'} Navigate to the named route.
inherited
namedLocation(String name, {Map<String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}, String? fragment}) → String
Get a location from route name and parameters. This is useful for redirecting to a named location.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop<T extends Object?>([T? result]) → void
Pop the top-most route off the current screen.
inherited
push<T extends Object?>(String location, {Object? extra}) → Future<T?>
Push a URI location onto the page stack w/ optional query parameters, e.g. /family/f2/person/p1?color=blue.
inherited
pushNamed<T extends Object?>(String name, {Map<String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}, Object? extra}) → Future<T?>
Push a named route onto the page stack w/ optional parameters, e.g. name='person', pathParameters={'fid': 'f2', 'pid': 'p1'}
inherited
pushReplacement<T extends Object?>(String location, {Object? extra}) → Future<T?>
Replaces the top-most page of the page stack with the given URL location w/ optional query parameters, e.g. /family/f2/person/p1?color=blue.
inherited
pushReplacementNamed<T extends Object?>(String name, {Map<String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}, Object? extra}) → Future<T?>
Replaces the top-most page of the page stack with the named route w/ optional parameters, e.g. name='person', pathParameters={'fid': 'f2', 'pid': 'p1'}.
inherited
refresh() → void
Refresh the route.
inherited
replace<T>(String location, {Object? extra}) → Future<T?>
Replaces the top-most page of the page stack with the given one but treats it as the same page.
inherited
replaceNamed<T>(String name, {Map<String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}, Object? extra}) → Future<T?>
Replaces the top-most page with the named route and optional parameters, preserving the page key.
inherited
restore(RouteMatchList matchList) → void
Restore the RouteMatchList
inherited
toString() → String
A string representation of this object.
inherited

Operators

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