push<T> static method

Future<T?> push<T>(
  1. BuildContext context, {
  2. required WidgetBuilder builder,
  3. RouteSettings? settings,
  4. bool maintainState = true,
  5. bool fullscreenDialog = false,
  6. String? title,
})

Pushes a new route using the platform-adaptive page route.

Implementation

static Future<T?> push<T>(
  BuildContext context, {
  required WidgetBuilder builder,
  RouteSettings? settings,
  bool maintainState = true,
  bool fullscreenDialog = false,
  String? title,
}) {
  return Navigator.of(context).push<T>(
    create<T>(
      builder: builder,
      settings: settings,
      maintainState: maintainState,
      fullscreenDialog: fullscreenDialog,
      title: title,
    ),
  );
}