i just tried to get an image from network using this function
Completer<ImageInfo> completer = Completer();
Future<ui.Image> getImage(String path) async {
[var img = new NetworkImage(path);
img.resolve(ImageConfiguration()).addListener(ImageStreamListener((ImageInfo info,bool _){
completer.complete(info);
}));][1]
ImageInfo imageInfo = await completer.future;
return imageInfo.image;
}
but i got a problem which i couldn't solve. Full error in attached screenshot.
Look around for any non-alphabetic character in URI. For me, it was a space char before 'https'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With