OpenCustomSheet.scrollableSheet constructor
OpenCustomSheet.scrollableSheet(
- BuildContext context, {
- required Widget body({
- ScrollController? scrollController,
- dynamic onClose(
- dynamic
- bool expand = true,
- double initialChildSize = 0.5,
- double minChildSize = 0.25,
- double maxChildSize = 1.0,
- Color? barrierColor,
- Color? backgroundColor,
- Color? handleColor,
- bool barrierDismissible = true,
- ShapeBorder? sheetShape,
- EdgeInsetsGeometry? sheetPadding,
Factory constructor to create a scrollable sheet without default action buttons.
This is useful for displaying large amounts of content that require scrolling.
Example usage:
OpenCustomSheet.scrollableSheet(
context,
body: ({scrollController}) => ListView.builder(
controller: scrollController,
itemCount: 50,
itemBuilder: (context, index) => ListTile(title: Text('Item $index')),
),
);
Implementation
factory OpenCustomSheet.scrollableSheet(
BuildContext context, {
required Widget Function({ScrollController? scrollController}) body,
Function(dynamic)? onClose,
bool expand = true,
double initialChildSize = 0.5,
double minChildSize = 0.25,
double maxChildSize = 1.0,
Color? barrierColor,
Color? backgroundColor,
Color? handleColor,
bool barrierDismissible = true,
ShapeBorder? sheetShape,
EdgeInsetsGeometry? sheetPadding,
}) {
return OpenCustomSheet(
scrollable: true,
expand: expand,
initialChildSize: initialChildSize,
minChildSize: minChildSize,
maxChildSize: maxChildSize,
onClose: onClose,
barrierColor: barrierColor,
barrierDismissible: barrierDismissible,
backgroundColor: backgroundColor,
handleColor: handleColor,
sheetShape: sheetShape,
sheetPadding: sheetPadding,
showDefaultButtons: false,
// Disable default buttons for scrollable sheet
body: body,
);
}