push<T extends Object?> method

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

Push a new page with the given widget directly.

Example: context.push(MyPage())

Implementation

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