OpenCustomSheet constructor

const OpenCustomSheet({
  1. required Widget body({
    1. ScrollController? scrollController,
    }),
  2. dynamic onClose(
    1. dynamic
    )?,
  3. bool barrierDismissible = true,
  4. Color? barrierColor,
  5. Color? backgroundColor,
  6. Color? handleColor,
  7. ShapeBorder? sheetShape,
  8. EdgeInsetsGeometry? sheetPadding,
  9. bool enableDrag = true,
  10. bool showDragHandle = true,
  11. double initialChildSize = 0.5,
  12. double minChildSize = 0.25,
  13. 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;