【发布时间】:2018-11-12 05:05:02
【问题描述】:
使用showModalBottomSheet时有没有办法改变覆盖背景颜色?
现在颜色总是灰色,但我想使用不同的颜色,如下所示。
这里是演示中使用的代码供参考
showModalBottomSheet<void>(context: context, builder: (BuildContext context) {
return Container(
child: Padding(
padding: const EdgeInsets.all(32.0),
child: Text('This is the modal bottom sheet. Tap anywhere to dismiss.',
textAlign: TextAlign.center,
style: TextStyle(
color: Theme.of(context).accentColor,
fontSize: 24.0
)
)
)
);
});
【问题讨论】: