Flutter 如何将URL列表转换为图像列表?

Flutter 如何将URL列表转换为图像列表?,flutter,dart,carousel,Flutter,Dart,Carousel,widget.post['imageUrl']具有图像urls的列表 当传递此小部件.post[“imageUrl”][0]时,我只得到一张图像 我如何检查列表中有多少图像,并在此旋转木马中一起显示 List image=widget.post['imageUrl']; 容器( 高度:设备高度, 儿童:旋转木马( boxFit:boxFit.cover, 图像:[ 图像网络( 网络映像(映像[0]) ) ], ), 装饰:盒子装饰( borderRadius:仅限borderRadius( 左下

widget.post['imageUrl']
具有图像
url
s的列表

当传递此
小部件.post[“imageUrl”][0]
时,我只得到一张图像

我如何检查列表中有多少图像,并在此旋转木马中一起显示

List image=widget.post['imageUrl'];
容器(
高度:设备高度,
儿童:旋转木马(
boxFit:boxFit.cover,
图像:[
图像网络(
网络映像(映像[0])
)
],
),
装饰:盒子装饰(
borderRadius:仅限borderRadius(
左下角:半径。圆形(10),
右下角:半径。圆形(10),
),
),
),
修复程序 在代码中,而不是

图像:[
图像网络(
网络映像(映像[0])
)
],
你可以写类似这样的东西

images:widget.post['imageUrl'].map((e)=>Image.network(e)).toList(),