pushReplacementNamed method

  1. @Deprecated('Use vRouter.toNamed(..., isReplacement: true) instead')
void pushReplacementNamed(
  1. String name, {
  2. Map<String, String> pathParameters = const {},
  3. Map<String, String> queryParameters = const {},
  4. Map<String, String> historyState = const {},
})

Replace the url given a VRouteElement name The difference with pushNamed is that this overwrites the current browser history entry

We can also specify path parameters to inject into the new path

We can also specify queryParameters, either by directly putting them is the url or by providing a Map using queryParameters

We can also put a state to the next route, this state will be a router state (this is the only kind of state that we can push) accessible with VRouter.of(context).historyState

After finding the url and taking charge of the path parameters it updates the url

To specify a name, see VPath.name

Implementation

@Deprecated('Use vRouter.toNamed(..., isReplacement: true) instead')
void pushReplacementNamed(
  String name, {
  Map<String, String> pathParameters = const {},
  Map<String, String> queryParameters = const {},
  Map<String, String> historyState = const {},
}) =>
    toNamed(
      name,
      pathParameters: pathParameters,
      queryParameters: queryParameters,
      historyState: historyState,
      isReplacement: true,
    );