SlidingBottomSheet constructor
SlidingBottomSheet({
- Key? key,
- required Widget builder(),
- SlidingBottomSheetController? controller,
- bool isDraggable = true,
- Color? backgroundColor,
- Duration? reverseDuration,
- double backgroundBlur = 0.0,
- Duration duration = const Duration(milliseconds: 200),
- Curve curve = Curves.decelerate,
- VoidCallback? onPanelOpened,
- VoidCallback? onPanelClosed,
- double upperBound = 1.0,
- double lowerBound = 0.0,
- Curve? reversedCurve,
- void onPanelSlide(
- double position
- BoxConstraints? constraints,
- bool? resizeToAvoidBottomInset,
- ScrollController? scrollController,
- dynamic onSizeChanged(
- double height
Create a SlidingBottomSheet like a AlertDialog. This widget is similar than sliding_up_panel package.
Example:
navigator.pushOpaque(
SlidingBottomSheetPage(builder: (_, __) => SlidingBottomSheetContainer(...)),
);
Implementation
SlidingBottomSheet({
Key? key,
required this.builder,
this.controller,
this.isDraggable = true,
Color? backgroundColor,
this.reverseDuration,
this.backgroundBlur = 0.0,
this.duration = const Duration(milliseconds: 200),
this.curve = Curves.decelerate,
this.onPanelOpened,
this.onPanelClosed,
this.upperBound = 1.0,
this.lowerBound = 0.0,
this.reversedCurve,
this.onPanelSlide,
this.constraints,
this.resizeToAvoidBottomInset,
this.scrollController,
this.onSizeChanged,
}) : backgroundColor = backgroundColor ?? Colors.black.withOpacity(0.2),
super(key: key);