pushReplacement<T> method
Pushes a new route, replacing the current one.
Implementation
Future<T?> pushReplacement<T>(
Widget widget, {
NavigationTransition? transition,
}) async {
final result = await _key.currentState?.pushReplacement<T, dynamic>(
_buildRoute<T>(widget, transition),
);
return result;
}