pushReplacementNamed<T extends Object, TO extends Object> method
Replace the current route of the navigator by pushing the given route and then disposing the previous route once the new route has finished animating in.
Implementation
Future<T?> pushReplacementNamed<T extends Object, TO extends Object>(
String routeName,
{Object? args}) async {
return navigationKey.currentState?.pushReplacementNamed<T, TO>(
routeName,
arguments: args,
);
}