BottomSheet constructor Null safety
- {Key? key,
- AnimationController? animationController,
- bool enableDrag = true,
- BottomSheetDragStartHandler? onDragStart,
- BottomSheetDragEndHandler? onDragEnd,
- Color? backgroundColor,
- double? elevation,
- ShapeBorder? shape,
- Clip? clipBehavior,
- BoxConstraints? constraints,
- required VoidCallback onClosing,
- 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);