pushReplacementWidget<T> method
Replaces the current route with a new route containing the given widget.
Returns a Future that completes when the new route is popped off the navigator.
Implementation
Future<T?> pushReplacementWidget<T>(Widget widget) {
return pushReplacement(NavUtil.route(widget));
}