Closed zxiaohong closed 5 years ago
Oh, I find the solution with shrinkWrap
property。
child: AnimatedList(
shrinkWrap: true,
initialItemCount: room['devices'].length,
itemBuilder: (BuildContext context, int index, Animation animation){
return ScaleTransition(
scale: animation,
child: _singleDeviceCard(room['room_id'], room['devices'][index], signal),
);
},
)
Thanks for your sharing, I have benefited a lot from it.If I have several parts in a page that need to use AnimatedList, what should I do?
just like the above code show,I have several
singleRoomDevides
widget in my page, the_singleDeviceCard
widget is a normal widget。I get the following error:
Do you know how to fix it? Thank you.