'The following ArgumentError was thrown resolving an image codec
════════ Exception caught by image resource service
The following ArgumentError was thrown resolving an image codec:
Invalid argument(s): No host specified in URI http:
When the exception was thrown, this was the stack:
#0 _HttpClient._openUrl (dart:_http/http_impl.dart:2191:9)
#1 _HttpClient.getUrl (dart:_http/http_impl.dart:2122:48)
#2 NetworkImage._loadAsync (package:flutter/src/painting/_network_image_io.dart:84:59)
<asynchronous suspension>
#3 NetworkImage.load (package:flutter/src/painting/_network_image_io.dart:47:14)
...
Image provider: NetworkImage("http:", scale: 1.0)
Image key: NetworkImage("http:", scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════
I/zygote ( 5217): Do partial code cache collection, code=30KB, data=25KB
I/zygote ( 5217): After code cache collection, code=30KB, data=25KB
I/zygote ( 5217): Increasing code cache capacity to 128KB
I/flutter ( 5217): 0
Solution 1:[1]
No host specified in URI errors are usually thrown when Flutter is unable to resolve the provided source for the NetworkImage. Ensure that the URL is valid. You can try using mock image URLs to see if either the NetworkImage or the image source causes the issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Omatt |
