pushNamedRoute<T extends Object?> method
Pushes a named route onto the navigator stack.
The routeName parameter specifies the name of the route to push.
The args parameter can be used to pass arguments to the pushed route.
Returns a Future that resolves to the value returned by the pushed route.
Implementation
Future<T?> pushNamedRoute<T extends Object?>(String routeName,
{Object? args}) {
return Navigator.of(this).pushNamed<T>(
routeName,
arguments: args,
);
}