replace<T> method
Replaces the top-most route match from base
with the location
.
Implementation
Future<T?> replace<T>(String location,
{required RouteMatchList base, Object? extra}) {
final Completer<T?> completer = Completer<T?>();
_setValue(
location,
RouteInformationState<T>(
extra: extra,
baseRouteMatchList: base,
completer: completer,
type: NavigatingType.replace,
),
);
return completer.future;
}