Future push(BuildContext context, Route route)

Push a route onto the navigator that most tightly encloses the given context.

Adds the given route to the Navigator's history, and transitions to it. The route will have didPush() and didChangeNext() called on it; the previous route, if any, will have didChangeNext() called on it; and the Navigator observer, if any, will have didPush() called on it.

Returns a Future that completes when the pushed route is popped.

Source

static Future<dynamic> push(BuildContext context, Route<dynamic> route) {
  return Navigator.of(context).push(route);
}