pushReplacement<T extends Object?> method
Replaces the top-most page of the page stack with the given URL location
w/ optional query parameters, e.g. /family/f2/person/p1?color=blue.
See also:
Implementation
@override
Future<T?> pushReplacement<T extends Object?>(
String location, {
Object? extra,
}) {
calls.add(
NavigationCall(NavigationKind.pushReplacement, location, extra: extra),
);
_stack.removeLast().complete(null);
final entry = _Entry(location);
_stack.add(entry);
return entry.result.then((value) => value as T?);
}