dartflutter

how to set showModalBottomSheet to full height?


I use showRoundedModalBottomSheet, how can I adjust this modal height till the appbar?

enter image description here


Solution

  • [Update]

    In showModalBottomSheet(...) set the property isScrollControlled:true.

    It will make bottomSheet to full height.


    [Original answer]

    You can Implement the FullScreenDialog instead.

    Flutter Gallery app has an example of FullScreenDialog

    You can open your Dialog using below code:

    Navigator.of(context).push(new MaterialPageRoute<Null>(
          builder: (BuildContext context) {
            return Dialog();
          },
        fullscreenDialog: true
      ));
    

    Check this blog post too for more:

    Hope it will help you.