Flutter web Image.network() not loading but url is correct.
Subscribe to TLDRStories.com to get your daily dose of tech news, condensed into a few stories.
I build my app for android and iOS. So recently flutter run it on the web and all hell broke lose. The first run didn't even work.
Image.network() errorbuilder was throwing this error below:
Error message
ImageCodecException: Failed to load network image.
Image URL: https://images.igdb.com/igdb/image/upload/t_cover_big/ss6bi7081my4mzebjkzb.png
Trying to load an image from another domain? Find answers at:
https://flutter.dev/docs/development/platform-integration/web-images
All the images on my web version didn't really work but it works on iOS and android.
Put this in your index.html and the images will start appearing!
<script type="text/javascript">
window.flutterWebRenderer = "html";
</script>
Weeeeeeeeeeโฆ. it's fixed!
๐ Follow me and drop me some claps ๐๐ ๐ if this article helps you, it motivates ๐ช me to create more! Thank you, everyone! ๐
Subscribe to TLDRStories.com to get your daily dose of tech news, condensed into a few stories.