答案 0 :(得分:0)
如果用户单击-半透明区域-ModalBottomSheet
将不会使用-WillPopScope
showModalBottomSheet(
context: context,
builder: (context) {
return WillPopScope( // add this
onWillPop: () async => false,
child: Container()); // your code continues
});