-1

In the two examples below, the first returns the image correctly, in the second it gives an error:

"Failed to load network image".

Is this a CORS issue? That is, on the server in the second example, cross-origin is not enabled? What to do?

Image.network('https://cdn.pixabay.com/photo/2017/12/06/11/03/brazil-3001462_960_720.png') 
Image.network('https://www.camara.leg.br/internet/deputado/bandep/204379.jpg') 

Thank you very much

4
  • are you running on web? Commented Feb 1, 2022 at 13:27
  • I'm using chrome (web-javascript) as emulator Commented Feb 1, 2022 at 13:33
  • Yes. Solved. Thank you very much God bless you. Commented Feb 1, 2022 at 13:51
  • Glad to help you out, feel free to close the question by accepting duplication. Commented Feb 1, 2022 at 13:52

1 Answer 1

-1

Use html renderer to overcome the issue, cis here for chrome.

flutter run -d c --web-renderer html 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.