push<T> method

Future<T?> push<T>(
  1. Widget widget
)

Push to a route with the given Widget and return generic Type T

Implementation

Future<T?> push<T>(Widget widget) {
  return Navigator.of(
    this,
  ).push<T>(MaterialPageRoute<T>(builder: (BuildContext context) => widget));
}