https://kotlinlang.org logo
#compose
Title
# compose
a

Andrey Larionov

12/12/2023, 9:46 AM
Hi Is there any reasons why
Copy code
suspend fun animateScrollToItem(
    index: Int,
    scrollOffset: Int = 0
) {
    animateScrollScope.animateScrollToItem(index, scrollOffset)
}
function of
LazyListState
doesn’t have
animationSpec
parameter? As I can see it uses
Copy code
suspend fun <T, V : AnimationVector> AnimationState<T, V>.animateTo(
    targetValue: T,
    animationSpec: AnimationSpec<T> = spring(),
    sequentialAnimation: Boolean = false,
    block: AnimationScope<T, V>.() -> Unit = {}
)
under the hood like
Copy code
anim.animateTo(
    target,
    sequentialAnimation = (anim.velocity != 0f)
)
z

Zach Klippenstein (he/him) [MOD]

12/12/2023, 4:15 PM
I’m not sure, but feel free to file a feature request and link here
a

Andrey Larionov

12/12/2023, 4:16 PM
Github/YouTrack?
z

Zach Klippenstein (he/him) [MOD]

12/12/2023, 4:29 PM
Link to Google issue tracker is in channel description