pushReplacement<T> method
Removes the top-most route match from base and pushes the location as a
new route on top.
Implementation
Future<T?> pushReplacement<T>(String location, {required RouteMatchList base, Object? extra}) {
final completer = Completer<T?>();
_setValue(
location,
RouteInformationState<T>(
extra: extra,
baseRouteMatchList: base,
completer: completer,
type: NavigatingType.pushReplacement,
),
);
return completer.future;
}