![](/img/trans.png)
[英]Flutter - How to tint an image's black color only, without touching transparent or white part?
[英]Flutter transparent black color
用容器包裹圖標並為其添加顏色
InkWell(
onTap: (){},
Container(
padding: EdgeInsets.all(7),
child : Icon(Icons.mute),
color: Colors.black.withOpacity(0.5)
)
)
用這個
color:Colors.transparent,
如果您使用Card Widget ,則需要將海拔設為零
像這樣
elevation: 0,
color: Colors.transparent,
或者如果你想減少顏色的不透明度,你可以使用
Colors.black.withOpcaity(.5)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.