在and and上,能够正确设置背景颜色,如下:
AppBar
在
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.red,
的动作中,a的颜色设置为相同的值:
AppBar
这是按预期的。但是,如果我在两个地方添加FloatingActionButton
,则喜欢
actions: [
FloatingActionButton(
backgroundColor: Colors.red,
withOpacity(0.3)
的颜色不是粉红色的,而是黑色的深粉红色,好像是黑色混合的。问题是什么,正确的方法是什么? thanks
flutter
Colors.red.withOpacity(0.3)
,已被AppBar
替换。
前
After
v3.27
有关更多详细信息,您可以查看“扑动迁移指南:移民指南”