`LazyListState` has `animateBy` which accepts an `...
# compose
d
LazyListState
has
animateBy
which accepts an
AnimationSpec
and it also has
animateScrollToItem
which doesn't accept
AnimationSpec
and hardcodes it to
spring()
. Is this asymmetry on purpose? Or can I request this feature?
a
unfortunately it is not really possible to allow customizing the animation as we do not know the final offset we need to scroll by because we do not know the sizes of items which are not visible. so we are doing some custom logic in order to first just scroll in the needed direction with one animation, and then when the target item became visible we start another animation
d
oh, clever. I see, OK!