flutter如何展示base64格式的图片,在web中这都不是事,但是在flutter中我们还是要稍微转换下,参考以下示例代码:
//base64格式图片转Image对象
Image img = Image.memory(base64Decode(BASE64_STRING));
//Image对象展示
Container(
decoration: BoxDecoration(
color: Colors.green,
image: DecorationImage(
image: img.image // <--- 要展示图片
)
)
全部评论