Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

dart - how to set showModalBottomSheet to full height?

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

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

[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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...