В моем ответе есть base64String, и я пытаюсь преобразовать этот base64 в изображение. Я использовал класс Uint8List https://api.dartlang.org/stable/2.4.0/dart-typed_data/Uint8List-class.html., но не могу сослаться на мой преобразованный base64 в Image.memory.
class Data {
String sId;
String name;
String category;
String image;
int iV;
var decoded;
Uint8List bytes ;
Data({this.sId, this.name, this.category, this.image, this.iV, this.bytes});
Data.fromJson(Map<String, dynamic> json) {
sId = json['_id'];
name = json['name'];
category = json['category'];
image = json['image'];
iV = json['__v'];
// decoded = Base64Decoder().convert(image);
bytes = base64.decode(image);
}
Container(
margin: const EdgeInsets.symmetric(horizontal: 2.0),
width: 100.0,
height: 140.0,
child:Image.memory('${data.bytes}'),
),
введите описание изображения здесь