颤振:-显示BottomSheet透明度 [英] Flutter:- show BottomSheet transparency
本文介绍了颤振:-显示BottomSheet透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想打开一个showBottomSheet。这是我的代码,可以正常工作,我可以打开ButtomSheet,但不能提供透明效果。我可以在此工作表的后面看到,即使我也尝试了不透明度也无法正常工作。
I want to open a showBottomSheet. here is my code which working fine, I am able to open ButtomSheet, but it's not giving transparency effect. that I could see behind of this sheet, even I also tried with Opacity which also not working.
showBottomSheet(
context: context,
builder: (context) {
return Opacity(
opacity: .1,
child: Container(
height: 400.0,
color: Colors.transparent,
),
);
});
推荐答案
这很简单,仅在main中实现:
It is very easy, only implement in main:
bottomSheetTheme: BottomSheetThemeData(
backgroundColor: Colors.black.withOpacity(0)),
另外,请参见下图。
这篇关于颤振:-显示BottomSheet透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文