replace method
Replaces the current history entry.
The optional state is stored on the entry and can be read back via
location's RouteInformation.state.
Implementation
@override
void replace(Uri uri, [Object? state]) {
action = .replace;
_entries[index] = _MemoryEntry(
info: RouteInformation(uri: uri, state: state),
identifier: generateIdentifier(),
);
}