[英]ListView.builder inside SliverList SliverChildBuilderDelegate not rendering Images on first load
my images (from api) don't render at first load unless I scroll down and back to top again我的图像(来自 api)不会在第一次加载时呈现,除非我向下滚动并再次返回顶部
here is my code structure这是我的代码结构
CustomScrollView(
slivers: [
SliverList(
delegate: SliverChildBuilderDelegate(_, index) {
return Column(children:
[
// SLIVERBUILDER INDEX
Text(somedata[_index]),
// MY IMAGE BUILDER
Container(child: ListView.builder(itemBuilder: (_, int index){
return Image.network(arrayOfImages[index]);
}))
]
);
}),
]
)
Try these:试试这些:
SliverList( delegate: SliverChildBuilderDelegate( (context, index) { return Container( // warp with container height: 450, child: Column(children: [ // SLIVERBUILDER INDEX Text('title'),
// MY IMAGE BUILDER Expanded( // add this widget child: ListView.builder( itemCount: arrayOfImage.length, // add this line
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.