pushNamed method
Push the route with the given routeName
onto the navigator that most
tightly encloses the given context.
The arguments
parameter is passed to the pushed route.
This method is just a wrapper around Navigator.pushNamed and is provided to allow for more concise code when using this extension.
The return value is the value that the popped route was removed with; this route cannot interact with the route below itself, and the return value is null unless the popped route was popped with Navigator.pop (e.g. by pressing the back button on Android).
Implementation
//
/// The [arguments] parameter is passed to the pushed route.
///
/// This method is just a wrapper around [Navigator.pushNamed] and is
/// provided to allow for more concise code when using this extension.
///
/// The return value is the value that the popped route was removed with;
/// this route cannot interact with the route below itself, and the return
/// value is null unless the popped route was popped with [Navigator.pop]
/// (e.g. by pressing the back button on Android).
Future<dynamic> pushNamed(
final String routeName, {
final Object? arguments,
}) => Navigator.of(this).pushNamed(routeName, arguments: arguments);