Future pushNamed(BuildContext context, String routeName)

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 to the result value passed to pop when the pushed route is popped off the navigator.

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);
}