replace method

void replace(
  1. String url, {
  2. Object? state,
})

Replaces the current browser history entry without reloading the page.

Implementation

void replace(String url, {Object? state}) {
  web.window.history.replaceState(_toJsState(state), '', url);
}