[英]How can display this response of Image URL in Flutter?
This is the response of ImageList i have.这是我对 ImageList 的回应。
How Can i display this postURL array in UI, may be image.network with Builder like GridView or ListView Builder.我如何在 UI 中显示这个 postURL 数组,可能是 image.network 和像 GridView 或 ListView Builder 这样的 Builder。
"postUrl": [
"https://uat-marc.s3.ap-south-1.amazonaws.com/news-feed/265_0.jpg",
"https://uat-marc.s3.ap-south-1.amazonaws.com/news-feed/265_1.JPG",
"https://uat-marc.s3.ap-south-1.amazonaws.com/news-feed/265_2.PNG",
"https://uat-marc.s3.ap-south-1.amazonaws.com/news-feed/265_3.PNG"
],
If implemented all model and try to display it, but i am getting some codec and not valid error.如果实现了所有 model 并尝试显示它,但我得到一些编解码器并且无效错误。
Please Help friends.请朋友帮忙。
Once you get the response from the API, you would store it as a list.从 API 获得响应后,您会将其存储为列表。 Then update the UI through list iterable with flutter NetworkImage widget.
然后使用 flutter NetworkImage 小部件通过可迭代的列表更新 UI。
The image you are trying to display you image in column您尝试在列中显示的图像
Column(
children: postUrl.map((url) => NetworkImage(url: url)).toList(),
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.