showInSheet<T> function

Future<T?> showInSheet<T>(
  1. BuildContext context, {
  2. required WidgetBuilder builder,
})

Pushes the page into the sheet context is a page of, and opens a sheet for it anywhere else.

Implementation

Future<T?> showInSheet<T>(
  BuildContext context, {
  required WidgetBuilder builder,
}) {
  if (isSheetPage(context)) {
    return Navigator.of(context).push(PagedSheetRoute<T>(builder: builder));
  }
  return showSheet<T>(context: context, builder: builder);
}