pushNamed<T extends Object?> method
Pushes a named route onto the navigator.
Allows passing arguments to the route. rootNavigator determines whether
to push the route onto the root navigator or the nearest Navigator ancestor.
Returns a Future that completes with the result of the pushed route when it is popped.
Implementation
Future<T?> pushNamed<T extends Object?>(
String routeName, {
Object? arguments,
bool rootNavigator = false,
}) {
return Navigator.of(
this,
rootNavigator: rootNavigator,
).pushNamed(routeName, arguments: arguments);
}