Reputation: 987
I have listview.builder widget which have several ListView.builder and GridView.count with scrollDirection:Axis.horizontal
inside of it. All the data comes from the services and I am using FutureBuilder to fetch them. My problem is whenever I scroll the main ListView.builder,other listview items comes with animation(items comes from left, from right). Specially if I scroll fast. I didn't use any animation, and I don't have any idea about the problem, maybe its rebuilding everytime I scroll the lisview, but I am using AutomaticKeepAliveClientMixin
for main ListView. Do you have any idea? Thanks for reading.
Upvotes: 2
Views: 741
Reputation: 987
This question might be duplicate, I solved my problem using this answer: https://stackoverflow.com/a/57984979/10025471
The problem is everytime I scroll the listview, it's children rebuilding again and again. So I convert to stateful widget all of the children and I added AutomaticKeepAliveClientMixin
to all of them. Now, there is no unwanted animation, and redundant rebuild
Upvotes: 1