gpt4 book ai didi

flutter - 在flutter中将自定义透明度值设置为floatingActionButton

转载 作者:行者123 更新时间:2023-12-02 19:38:59 24 4
gpt4 key购买 nike

floatingActionButton: FloatingActionButton(
onPressed: () {},
child: Icon(Icons.add),
backgroundColor: Colors.blueGrey[800],
),

如何为 float 操作按钮设置自定义不透明度/透明度值?是否有定义透明度百分比的属性?

最佳答案

您可以通过为其颜色添加不透明度来设置 float 按钮的透明度

floatingActionButton: FloatingActionButton(
onPressed: () {},
child: Icon(Icons.add),
backgroundColor: Colors.blueGrey.withOpacity(0.5),
),

关于flutter - 在flutter中将自定义透明度值设置为floatingActionButton,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60572677/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com