replace method
Replace current route.
Implementation
Future<void> replace(String path, {Map<String, String>? params}) async {
final matchedRoute = _matchRoute(path);
if (matchedRoute == null) return;
_currentPath = path;
_currentParams = params ?? _extractParams(path, matchedRoute.path);
notifyListeners();
}