Push a named route onto the navigator that most tightly encloses the given context.
The route name will be passed to that navigator's onGenerateRoute callback. The returned route will be pushed into the navigator.
Returns a Future that completes when the pushed route is popped.
Typical usage is as follows:
Navigator.pushNamed(context, '/nyc/1776');
Source
static Future<dynamic> pushNamed(BuildContext context, String routeName) { return Navigator.of(context).pushNamed(routeName); }