push<T extends Object?> method

Future<T?> push<T extends Object?>(
  1. Widget page
)

Pushes a new page onto the navigator stack and returns a Future that completes when the new page is popped.

This is the preferred method for standard navigation and waiting for a result.

Implementation

Future<T?> push<T extends Object?>(Widget page) {
  return Navigator.push<T>(
      this, MaterialPageRoute(builder: (context) => page));
}