简体   繁体   中英

Flutter:How to create a full screen mask view

Now I'm using the showModalBottomSheet,

when I click on the semi-transparent bottomsheet, it pops this view out, but what I want is that it doesn't respond to the user's click and still stays there, how do I do that?

How to create a full screen mask view?

在此处输入图片说明

If user click on - semi-transparent area - ModalBottomSheet won't close using - WillPopScope

showModalBottomSheet(
              context: context,
              builder: (context) {
                return WillPopScope(  // add this
                    onWillPop: () async => false,
                    child: Container()); // your code continues
              });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM