skip to Main Content

How to increase height of show modal bottom sheet.I can’t get this any longer than this.Can somebody help me to solve my problem.

I tried bunch of solutions but non of them worked.

enter image description here

enter image description here

2

Answers


  1. You just need to add isScrollControlled: true this parameter and add height to your widget then you can change the height of your Bottom sheet

       showModalBottomSheet(
        context: context,
        isScrollControlled: true,
        builder: (builder) {
          return Container(
            height: MediaQuery.of(context).size.height * 0.90,
            child: Center(child: ADD_YOUR_WIDGET_HERE()),
          );
        });
    

    Try with this

    Login or Signup to reply.
  2. In this case wrap your container with column widget.It may increase bottom sheet’s height.

        showModalBottomSheet(
        context: context,
        isScrollControlled: true,
        builder: (builder) {
          return Column(
        children: [
          Container(
            height: MediaQuery.of(context).size.height * 0.90,
            child: Center(child: ADD_YOUR_WIDGET_HERE()),
          )
        ],
      );});
    

    Note:If you want your bottom sheet in full screen you can wrap column in expanded widget.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search