flutter - Display image from Bytes/bodyBytes in flutter
问题描述
I'm getting an image in the HTTP POST as bytes and I want to show that in that image in flutter
解决方案
To show the image you can use Image.memory()
it accepts Uint8List
so you can pass your response.bodyBytes
to show an image
推荐阅读
- python - 如何从命令行激活 Anaconda 环境?
- kubernetes - 是否可以在不添加 Kubernetes 集群的情况下在 Gitlab 中运行测试?
- c# - 在 .NET Core 2 中创建 HttpClient 的最佳实践
- jmeter - 如何修复jemeter运行记录中的“不愿意透露存在”错误
- angular - Angular Material Stepper 的验证
- android - 在不破坏现有小部件的情况下重命名 AppWidgetProvider
- prolog - Prolog-仅使用“+”将代数表达式拆分为单独的原子和数字列表
- c# - 在选择时使用 ComboBox.DataSource 项
- c# - 如果我有一个重复次数的数字,我如何重复一个字符来组成一个字符串?
- awk - 根据 awk 中的字段值隔离行