Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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}'),
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement