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/