SlidingBottomSheet constructor

SlidingBottomSheet({
  1. Key? key,
  2. required Widget builder(
    1. BuildContext,
    2. ScrollController
    ),
  3. SlidingBottomSheetController? controller,
  4. bool isDraggable = true,
  5. Color? backgroundColor,
  6. Duration? reverseDuration,
  7. double backgroundBlur = 0.0,
  8. Duration duration = const Duration(milliseconds: 200),
  9. Curve curve = Curves.decelerate,
  10. VoidCallback? onPanelOpened,
  11. VoidCallback? onPanelClosed,
  12. double upperBound = 1.0,
  13. double lowerBound = 0.0,
  14. Curve? reversedCurve,
  15. void onPanelSlide(
    1. double position
    )?,
  16. BoxConstraints? constraints,
  17. bool? resizeToAvoidBottomInset,
  18. ScrollController? scrollController,
  19. dynamic onSizeChanged(
    1. 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);