I want to keepAlive
my widgets which are already rendered in ListView
. I was tried with addAutomaticKeepAlives:true
properties which provide by ListView
class.
Here is my sample code which I was used. Same issue in SliverChildBuilderDelegate
delegate which provide by SliverList
.
ListView.builder(
itemBuilder: (context,index){
return Card(
child: Container(
child: Image.asset("images/${index+1}.jpg",fit: BoxFit.cover,),
height: 250.0,
),
);
},
addAutomaticKeepAlives: true,
itemCount:40 ,
);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…