【发布时间】:2021-07-19 08:11:13
【问题描述】:
我想显示存储在 mysql 数据库中的图像 问题是我无法将 blob 格式转换为 Uint8list ;我搜索并找到了灵魂,但它们都不起作用 从 JSON 中获取 blob:
var blob = yourJSONMapHere['yourJSONKeyHere'];
var image = BASE64.decode(blob); // 图像是一个 Uint8List
现在,在 Image.memory 中使用图像
new Container(child: new Image.memory(image));
这个灵魂解决方案不起作用,因为 base64.decode 需要一个字符串源而不是一个 blob 文件来转换
【问题讨论】:
标签: image flutter blob converters