pushReplacement<T> static method
Replaces the current route on the navigator nearest to context.
Implementation
static Future<T?> pushReplacement<T>(
BuildContext context,
Route route, [
Object? result,
]) {
return of(context).pushReplacement<T>(route, result);
}