The multi_image_picker: 2.4.11 plugin returns a List<Asset>, each Asset having an imageData property that is a ByteData.
How can I show these in Flutter?
You can use the Image.memory constructor.
List<Asset> assets = ...; // use multi_image_picker to get the assets
return ListView.builder(
padding: EdgeInsets.all(8.0),
itemExtent: assets.length,
itemBuilder: (BuildContext context, int index) {
return Image.memory(assets[index].imageData.buffer.asUint8List());
},
);
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