openBottomSheet method

void openBottomSheet(
  1. BuildContext context,
  2. Widget child
)

Implementation

void openBottomSheet(BuildContext context, Widget child) {
  showModalBottomSheet(
      isDismissible: true,
      isScrollControlled: true,
      enableDrag: false,
      backgroundColor: DI.colors().mainBackground,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.only(
          topRight: DI.theme().radius.card.topRight,
          topLeft: DI.theme().radius.card.topLeft,
        ),
      ),
      elevation: 2,
      constraints: BoxConstraints(
        maxHeight: MediaQuery.of(context).size.height * 0.9,
        minWidth: MediaQuery.of(context).size.width - 64,
        maxWidth: MediaQuery.of(context).size.width - 64,
      ),
      context: context,
      builder: (context) => child
  );
}