DraggableBottomSheet constructor

DraggableBottomSheet({
  1. Key? key,
  2. double maxHeight = 500,
  3. double minHeight = 0,
  4. Duration animationDuration = const Duration(milliseconds: 200),
  5. Widget? header,
  6. bool autoSwipped = true,
  7. bool draggableBody = true,
  8. bool gradientOpacity = true,
  9. bool headerVisibilityOnTap = true,
  10. Color? backgroundColor = Colors.white,
  11. void onHide()?,
  12. double radius = 15,
  13. void onShow()?,
  14. required Widget body,
})

Implementation

DraggableBottomSheet(
    {super.key,
    this.maxHeight = 500,
    this.minHeight = 0,
    this.animationDuration = const Duration(milliseconds: 200),
    this.header,
    this.autoSwipped = true,
    this.draggableBody = true,
    this.gradientOpacity = true,
    this.headerVisibilityOnTap = true,
    this.backgroundColor = Colors.white,
    this.onHide,
    this.radius = 15,
    this.onShow,
    required this.body}) {
  if (!GetInstance().isRegistered<BottomSheetController>()) {
    Get.put(BottomSheetController());
  }
  Get.find<BottomSheetController>().maxHeight = maxHeight;
  Get.find<BottomSheetController>().animationDuration = animationDuration;
  Get.find<BottomSheetController>().minHeight = minHeight;
  if (minHeight > Get.find<BottomSheetController>().currentHeight) {
    Get.find<BottomSheetController>().currentHeight = minHeight;
  }
  Get.find<BottomSheetController>().autoSwipped = autoSwipped;
  Get.find<BottomSheetController>().onHide = onHide;
  Get.find<BottomSheetController>().onShow = onShow;
}