pushNamed<T> function
Pushes the route named routeName with arguments, like Navigator.pushNamed.
Implementation
Future<T?> pushNamed<T>(
BuildContext context,
String routeName, {
Object? arguments,
bool rootNavigator = false,
}) {
return Navigator.of(
context,
rootNavigator: rootNavigator,
).pushNamed<T>(routeName, arguments: arguments);
}