pushNamed<T extends Object?> static method
Future<T?>
pushNamed<T extends Object?>(
- BuildContext context,
- String routeName, {
- Object? arguments,
Implementation
static Future<T?> pushNamed<T extends Object?>(
BuildContext context,
String routeName, {
Object? arguments,
}) async {
MyRoute? route = getSecuredRouteFromRouteName(routeName);
if (route == null) {
throw RouteException("'$routeName' Route is not implemented");
}
return Navigator.of(context).pushNamed<T>(route.name, arguments: arguments);
}