showCustomModalBottomSheet static method

void showCustomModalBottomSheet({
  1. required BuildContext context,
  2. required Widget modal,
  3. double radius = 24,
  4. bool isDrag = true,
  5. bool isDismissible = true,
  6. bool isType = true,
  7. double paddingTop = 200,
})

Implementation

static void showCustomModalBottomSheet({
  required BuildContext context,
  required Widget modal,
  double radius = 24,
  bool isDrag = true,
  bool isDismissible = true,
  bool isType = true,
  double paddingTop = 200,
}) {
  showModalBottomSheet(
    isDismissible: isDismissible,
    enableDrag: isDrag,
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.only(
        topLeft: Radius.circular(radius.r),
        topRight: Radius.circular(radius.r),
      ),
    ),
    isScrollControlled: true,
    constraints: BoxConstraints(
      maxHeight: MediaQuery.sizeOf(context).height - paddingTop.r,
    ),
    backgroundColor: CustomStyle.transparent,
    context: context,
    builder: (context) => modal,
  );
}