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
fun SnapperFlingBehavior( layoutInfo: SnapperLayoutInfo, decayAnimationSpec: DecayAnimationSpec<Float>, springAnimationSpec: AnimationSpec<Float> = SnapperFlingBehaviorDefaults.SpringAnimationSpec, snapIndex: (SnapperLayoutInfo, startIndex: Int, targetIndex: Int) -> Int = SnapperFlingBehaviorDefaults.SnapIndex)
Content copied to clipboard
Functions
Link copied to clipboard
open suspend override fun ScrollScope.performFling(initialVelocity: Float): Float
Content copied to clipboard