I am trying to change the opacity of an icon, when it is present in the code in this format:
child: Icon(Icons.camera_alt),
I want to do it in the same way you can do it with a color:
color: Colors.green.withOpacity(0.25),
Is there a way to do this?
is there anything wrong with this approach?
Icon(
Icons.camera_alt,
color: Colors.green.withOpacity(0.25),
)
There is an Opacity widget you can use
Example
Opacity(
opacity: 0.25,
child: Icon(
Icons.ac_unit
),
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With