如何将showModalBottomSheet设置为全高 [英] how to set showModalBottomSheet to full height

查看:688
本文介绍了如何将showModalBottomSheet设置为全高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用showRoundedModalBottomSheet,如何将这种模式高度调整到应用栏以下?

i use showRoundedModalBottomSheet, how to adjust this modal height till below the appbar?

推荐答案

[更新]

showModalBottomSheet(...)设置属性 isScrollControlled:true

它将使bottomSheet达到最高高度。

It will make bottomSheet to full height.

[原始答案]

您可以改为实现FullScreenDialog。

You can Implement the FullScreenDialog instead.

Flutter Gallery应用程序具有 FullScreenDialog

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.

这篇关于如何将showModalBottomSheet设置为全高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆