replace method

void replace(
  1. String path
)

Replaces the current route without leaving a history entry.

Implementation

void replace(String path) {
  final normalized = path.startsWith('/') ? path : '/$path';
  _window.location.replace('#$normalized');
  _sync();
}