quire-io / scroll-to-index

scroll to index with fixed/variable row height inside Flutter scrollable widget
MIT License
518 stars 105 forks source link

Any way to specify the duration of the animation? #24

Closed random-webdeveloper closed 4 years ago

random-webdeveloper commented 4 years ago

Having a big list of items with dynamic height, sometimes the scrolling animation takes way too long. is there any way too speed it up?

jerrywell commented 4 years ago

you can try to give the suggested row height into scroll controller. given any average value is fine, because this library will auto correct the final position even over scrolling.

AutoScrollController(
  suggestedRowHeight: 500
  ...
);
random-webdeveloper commented 4 years ago

Thank you for your answer ^^

yeah that works. is there any way to specify that in the scrollToIndex function? like scrolling always taking the same amount of time

random-webdeveloper commented 4 years ago

Nevermind, found out that you can pass a duration into that function, works, even tho it looks a bit buggy