openSheet<T> function
Future<T?>
openSheet<T>({
- required BuildContext context,
- required WidgetBuilder builder,
- required OverlayPosition position,
- bool barrierDismissible = true,
- bool transformBackdrop = false,
- Color? barrierColor,
Implementation
Future<T?> openSheet<T>({
required BuildContext context,
required WidgetBuilder builder,
required OverlayPosition position,
bool barrierDismissible = true,
bool transformBackdrop = false,
Color? barrierColor,
}) {
return openRawDrawer<T>(
context: context,
transformBackdrop: transformBackdrop,
barrierDismissible: barrierDismissible,
useSafeArea: false, // handled by the sheet itself
builder: (context, extraSize, size, padding, stackIndex) {
return SheetWrapper(
position: position,
expands: true,
extraSize: extraSize,
size: size,
padding: padding,
barrierColor: barrierColor,
stackIndex: stackIndex,
child: builder(context),
);
},
position: position,
).future;
}