replace static method
Implementation
static void replace(String? route, String? previousRoute) {
final mRoute = route.trimmedRoute;
if (_isIgnorableRoute(mRoute)) return;
if (!_isSupportedRoute(mRoute)) return;
if (previousRoute != null) {
i._routes.remove(previousRoute.trimmedRoute);
} else {
i._routes.removeLast();
}
i._routes.add(mRoute);
i.notifyListeners();
}