showInSheet<T> function
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);
}