簡體   English   中英

Flutter:如何創建全屏蒙版視圖

[英]Flutter:How to create a full screen mask view

現在,我正在使用showModalBottomSheet,

當我單擊半透明的底表時,它將彈出該視圖,但是我想要的是它不響應用戶的點擊並仍然停留在該位置,我該怎么做?

如何創建全屏蒙版視圖?

在此處輸入圖片說明

如果用戶單擊-半透明區域ModalBottomSheet將無法使用WillPopScope

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM