如何在 Flutter 中更改 ModalBottomSheet 的投影(或阴影)

Joe*_*röm 5 flutter bottom-sheet flutter-layout

ModalBottomSheet 自动在下层屏幕上渲染阴影或阴影。

在showModalBottomSheet方法中将背景颜色设置为透明只会影响包含子窗口小部件的区域。
它不会删除模态下的阴影。

我可以删除或更改阴影的不透明度吗?

小智 4

showModalBottomSheet(
        barrierColor: Colors.white.withOpacity(0),
...
Run Code Online (Sandbox Code Playgroud)

请注意,我正在使用属性“barrierColor”