BottomSheet constructor Null safety

const BottomSheet(
  1. {Key? key,
  2. AnimationController? animationController,
  3. bool enableDrag = true,
  4. BottomSheetDragStartHandler? onDragStart,
  5. BottomSheetDragEndHandler? onDragEnd,
  6. Color? backgroundColor,
  7. double? elevation,
  8. ShapeBorder? shape,
  9. Clip? clipBehavior,
  10. BoxConstraints? constraints,
  11. required VoidCallback onClosing,
  12. 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.onDragStart,
  this.onDragEnd,
  this.backgroundColor,
  this.elevation,
  this.shape,
  this.clipBehavior,
  this.constraints,
  required this.onClosing,
  required this.builder,
}) : assert(enableDrag != null),
     assert(onClosing != null),
     assert(builder != null),
     assert(elevation == null || elevation >= 0.0);