为什么在flutter中从api获取数据时轮播滑块只显示第一张图片

问题描述 投票:0回答:1

this is the error, I'm getting.

如果我使用静态图像 url,它工作正常,但从 Api 获取动态图像时,仅显示第一个图像,而其他图像不显示。图像存储在 s3 存储桶中。

这是示例列表 [https://s3.amazonaws.com/s3-photocart-images/public/photocart-images/1698667906_image_cropper_1698667801113.jpg,https://s3.amazonaws.com/s3-photocart-images/public/ photocart-images/1698667908_image_cropper_1698667803676.jpg]

flutter amazon-s3 carousel carousel-slider
1个回答
0
投票

@budgetapp 检查 URI 中是否有任何非字母字符。就我而言,我发现“https”前面有一个空格字符。或者,您可以使用以下代码:

url.replaceAll('"', '');

© www.soinside.com 2019 - 2024. All rights reserved.