Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Change Image.asset opacity using opacity parameter in Image widget

I have a simple image that I want to put semi transparent. I have seen some methods to do it, but none of them was talking about the parameter opacity of the own Image.asset that accepts a widget of type Animation. Is it possible to change the opacity permanently with this parameter?

Image.asset(
  "assets/images/triangles_small.png",
  height: 380,
),

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I think that’s what you’re looking for –>

Opacity(
          opacity: 0.5,
          child: Image.asset(
            "image/link",
            height: 380,
            width: 380,
          ),
        )
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading