SnapperFlingBehavior

A snapping FlingBehavior for LazyListState. Typically this would be created via rememberSnapperFlingBehavior.

Note: the default parameter value for decayAnimationSpec is different to the value used in rememberSnapperFlingBehavior, due to not being able to access composable functions.

Constructors

Link copied to clipboard
constructor(layoutInfo: SnapperLayoutInfo, decayAnimationSpec: DecayAnimationSpec<Float>, springAnimationSpec: AnimationSpec<Float> = SnapperFlingBehaviorDefaults.SpringAnimationSpec, snapIndex: (SnapperLayoutInfo, startIndex: Int, targetIndex: Int) -> Int = SnapperFlingBehaviorDefaults.SnapIndex)

Functions

Link copied to clipboard
open suspend override fun ScrollScope.performFling(initialVelocity: Float): Float

Properties

Link copied to clipboard

The target item index for any on-going animations.