BottomSheet constructor

const BottomSheet(
  1. {Key? key,
  2. AnimationController? animationController,
  3. bool enableDrag = true,
  4. bool? showDragHandle,
  5. Color? dragHandleColor,
  6. Size? dragHandleSize,
  7. BottomSheetDragStartHandler? onDragStart,
  8. BottomSheetDragEndHandler? onDragEnd,
  9. Color? backgroundColor,
  10. Color? shadowColor,
  11. double? elevation,
  12. ShapeBorder? shape,
  13. Clip? clipBehavior,
  14. BoxConstraints? constraints,
  15. required VoidCallback onClosing,
  16. required WidgetBuilder builder}
)

Creates a bottom sheet.

Typically, bottom sheets are created implicitly by ScaffoldState.showBottomSheet, for persistent bottom sheets, or by showModalBottomSheet, for modal bottom sheets.

Implementation

const BottomSheet({
  super.key,
  this.animationController,
  this.enableDrag = true,
  this.showDragHandle,
  this.dragHandleColor,
  this.dragHandleSize,
  this.onDragStart,
  this.onDragEnd,
  this.backgroundColor,
  this.shadowColor,
  this.elevation,
  this.shape,
  this.clipBehavior,
  this.constraints,
  required this.onClosing,
  required this.builder,
}) : assert(elevation == null || elevation >= 0.0);