showGlassSheet<T> function
- required BuildContext context,
- required WidgetBuilder builder,
- bool showHandle = true,
- bool isDismissible = true,
- bool enableDrag = true,
- EdgeInsetsGeometry padding = const EdgeInsets.fromLTRB(20, 4, 20, 20),
Shows a sheet of glass that floats up from the bottom, as iOS 26's: inset from the screen's edges, rounded all round, and dragged down to dismiss.
Resolves with the value the sheet is popped with.
Implementation
Future<T?> showGlassSheet<T>({
required BuildContext context,
required WidgetBuilder builder,
bool showHandle = true,
bool isDismissible = true,
bool enableDrag = true,
EdgeInsetsGeometry padding = const EdgeInsets.fromLTRB(20, 4, 20, 20),
bool useRootNavigator = true,
}) {
final carried = GlassOverlayContext.of(context);
return Navigator.of(context, rootNavigator: useRootNavigator).push<T>(
_GlassSheetRoute<T>(
carried: carried,
builder: builder,
showHandle: showHandle,
dismissible: isDismissible,
enableDrag: enableDrag,
padding: padding,
),
);
}