toNamed method
void
toNamed(
- String name, {
- Map<
String, String> pathParameters = const {}, - Map<
String, String> queryParameters = const {}, - String? hash,
- Map<
String, String> historyState = const {}, - bool isReplacement = false,
inherited
pathParameters
needs to specify every path parameters
contained in the path corresponding to name
queryParameters
to add query parameters (you can also
add them manually)
historyState
is used an the web to restore browser
history entry specific state (like scroll amount)
isReplacement
determines whether to overwrite the current
history entry or create a new one. The is mainly useful
when using back
, forward
or vRouteInformationAt
, or on the web to control
the browser history entries
Also see:
- to if you don't need segment encoding
- toSegments if you need your path segments to be encoded
- toExternal if you want to navigate to an external url
Implementation
@override
void toNamed(
String name, {
Map<String, String> pathParameters = const {},
Map<String, String> queryParameters = const {},
String? hash,
Map<String, String> historyState = const {},
bool isReplacement = false,
}) =>
vRouterDelegate.toNamed(
name,
pathParameters: pathParameters,
queryParameters: queryParameters,
hash: hash,
historyState: historyState,
isReplacement: isReplacement,
);