TransformingLazyColumnDefaults

object TransformingLazyColumnDefaults


Contains the default values used by TransformingLazyColumn

Summary

Public functions

FlingBehavior
@Composable
snapFlingBehavior(
    state: TransformingLazyColumnState,
    snapOffset: Dp,
    decay: DecayAnimationSpec<Float>
)

Create and remember a FlingBehavior that will represent a natural fling curve which snaps to the nearest snap point as the fling decays.

Public functions

snapFlingBehavior

Added in 1.6.0
@Composable
fun snapFlingBehavior(
    state: TransformingLazyColumnState,
    snapOffset: Dp = 0.dp,
    decay: DecayAnimationSpec<Float> = exponentialDecay()
): FlingBehavior

Create and remember a FlingBehavior that will represent a natural fling curve which snaps to the nearest snap point as the fling decays. Items taller than their snap segment threshold are split into equal segments, each with its own snap point; see TransformingLazyColumnItemScope.snapSegmentThreshold to customize or disable splitting for an item.

Parameters
state: TransformingLazyColumnState

the state of the TransformingLazyColumn

snapOffset: Dp = 0.dp

an optional offset to be applied when snapping. Defines the distance from the center of the scrollable to the center of the snapped item or segment.

decay: DecayAnimationSpec<Float> = exponentialDecay()

the decay to use