showModal method

void showModal(
  1. dynamic context
)

This gives the bottom sheet widget.

Implementation

void showModal(context) {
  showModalBottomSheet(
    constraints: BoxConstraints.loose(Size(MediaQuery.of(context).size.width,
        heightOfBottomSheet!)), // <= this is set to 3/4 of screen size.
    isScrollControlled: true,
    enableDrag: dropDown.isDismissible,
    isDismissible: dropDown.isDismissible,
    shape: const RoundedRectangleBorder(
      borderRadius: BorderRadius.vertical(top: Radius.circular(15.0)),
    ),
    context: context,
    builder: (context) {
      return StatefulBuilder(
        builder: (BuildContext context, StateSetter setState) {
          return MainBody(dropDown: dropDown);
        },
      );
    },
  );
}