SwipeProgress

Class

Common

Deprecated SwipeableDeprecation

@ExperimentalMaterialApi
class SwipeProgress<T>(
    val from: T,
    val to: T,
    /*@FloatRange(from = 0.0, to = 1.0)*/
    val fraction: Float,
)

Collects information about the ongoing swipe or animation in swipeable.

To access this information, use SwipeableState.progress.

Parameters

fromThe state corresponding to the anchor we are moving away from.
toThe state corresponding to the anchor we are moving towards.
fractionThe fraction that the current position represents between from and to. Must be between 0 and 1.