OpenCustomSheet constructor
const
OpenCustomSheet({
- required Widget body({
- ScrollController? scrollController,
- dynamic onClose(
- dynamic
- bool barrierDismissible = true,
- Color? barrierColor,
- Color? backgroundColor,
- Color? handleColor,
- ShapeBorder? sheetShape,
- EdgeInsetsGeometry? sheetPadding,
- bool enableDrag = true,
- bool showDragHandle = true,
- double initialChildSize = 0.5,
- double minChildSize = 0.25,
- double maxChildSize = 1.0,
PUBLIC: Standard (non-scrollable) sheet constructor. For confirm/scrollable/expandable use the dedicated factories.
Implementation
const OpenCustomSheet({
required Widget Function({ScrollController? scrollController}) body,
this.onClose,
this.barrierDismissible = true,
this.barrierColor,
this.backgroundColor,
this.handleColor,
this.sheetShape,
this.sheetPadding,
this.enableDrag = true,
this.showDragHandle = true,
// NEW: exposed for default sheet (used only when enableDrag == true)
this.initialChildSize = 0.5,
this.minChildSize = 0.25,
this.maxChildSize = 1.0,
}) : _type = _SheetType.standard,
_standardBody = body,
_confirmBody = null,
_expandableHeader = null,
_expandableFooter = null,
_expandableBody = null,
_expandableController = null,
_presentAsRoute = true,
// flags for default sheet
scrollable = false,
// let DS occupy available height
expand = true,
// force confirm-only options off in the public ctor
showDefaultButtons = false,
firstButtonColor = null,
secondButtonColor = null,
firstButtonTextColor = null,
secondButtonTextColor = null,
confirmButtonText = null,
cancelButtonText = null,
padding = null,
buttonSpacing = null;