Future<Uint8List> _loadNetworkImage(String imgname) async {
try {
final ByteData imageData = await NetworkAssetBundle(Uri.parse('https://picsum.photos/250?image=9')).load("");
final Uint8List bytes = imageData.buffer.asUint8List();
return bytes;
} catch (_) {
throw "Couldn't resolve network Image.";
}
}
when i run this code on flutter web i am getting this error i dont know why can anyone please help me.
Error: Couldn't resolve network Image.
Uri uri = Uri.parse(filePath);
Uint8List fileData = await http.readBytes(uri);
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