GoRouterExtension extension Extensions
Supply a reference to the GoRouter itself.
dartdoc:
- on
Methods
-
canPop(
) → bool -
Returns
true
if there is more than 1 page on the stack. -
go(
String location, {Object? extra}) → void - Navigate to a location.
-
goNamed(
String name, {Map< String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}, Object? extra}) → void - Navigate to a named route.
-
namedLocation(
String name, {Map< String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}}) → String - Get a location from route name and parameters.
-
pop<
T extends Object?> ([T? result]) → void - Pop the top page off the Navigator's page stack by calling Navigator.pop.
-
push<
T extends Object?> (String location, {Object? extra}) → Future< T?> - Push a location onto the page stack.
-
pushNamed<
T extends Object?> (String name, {Map< String, String> pathParameters = const <String, String>{}, Map<String, dynamic> queryParameters = const <String, dynamic>{}, Object? extra}) → Future<T?> - Navigate to a named route onto the page stack.
-
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
. -
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'}
. -
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.
-
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.