replace method
Replaces the top page and current browser-history entry.
Implementation
void replace(String location, {Object? arguments}) {
argumentsCodec.encode(arguments);
parseRouteUri(location);
final entry = _entry(location, arguments: arguments);
_change(NavigationAction.replace, () {
_entries.removeLast().complete();
_entries.add(entry);
}, replace: true);
}