Closed jayeshindianic closed 3 years ago
I got same error in web (debug mode). Would you try web in release mode? It's working in release mode.
I'm still working on this issue, but I have no idea so far.
Add --web-renderer html
will be successfully showing the image in web.
Example for VS code (launch.json
):
{
"version": "0.2.0",
"configurations": [
{
"name": "Flutter Web",
"type": "dart",
"request": "launch",
"program": "lib/main.dart",
"args": ["--web-renderer", "html"]
}
]
}
https://github.com/flutter/flutter/issues/73109 https://flutter.dev/docs/development/tools/web-renderers
Add
--web-renderer html
will be successfully showing the image in web.Example for VS code (
launch.json
):{ "version": "0.2.0", "configurations": [ { "name": "Flutter Web", "type": "dart", "request": "launch", "program": "lib/main.dart", "args": ["--web-renderer", "html"] } ] }
flutter/flutter#73109 https://flutter.dev/docs/development/tools/web-renderers
DO i have to have the same configurations ?
I was having the same issue, but when I entered my browser developer tools console, I saw that it failed to load the resource because the server was not providing the image. It worked fine when building for Android.
I hope it helps who is getting into this issue. Go to your browser console and whatever is preventing the image to be loaded may be there.
I was having the same issue, but when I entered my browser developer tools console, I saw that it failed to load the resource because the server was not providing the image. It worked fine when building for Android.
I hope it helps who is getting into this issue. Go to your browser console and whatever is preventing the image to be loaded may be there.
Thank you so much... This helped me alot to know what exactly went wrong and how to fix it.
This Plugin is not working in flutter web.
[debug] Capture from onError ImageCodecException: Failed to decode image data. Image source: http://localhost:63126/assets/packages/flag/res/flag/fr.svg