SwipeProgress
@Immutable data class SwipeProgress<T>
kotlin.Any | |
↳ | androidx.compose.material.SwipeProgress |
Collects information about the ongoing swipe or animation in swipeable.
To access this information, use SwipeableState.progress.
Summary
Public constructors | |
---|---|
Collects information about the ongoing swipe or animation in swipeable. |
Properties | |
---|---|
Float |
The fraction that the current position represents between from and to. |
T |
The state corresponding to the anchor we are moving away from. |
T |
The state corresponding to the anchor we are moving towards. |
Public constructors
<init>
SwipeProgress(
from: T,
to: T,
@FloatRange(0.0, 1.0) fraction: Float)
Collects information about the ongoing swipe or animation in swipeable.
To access this information, use SwipeableState.progress.
Parameters | |
---|---|
from: T | The state corresponding to the anchor we are moving away from. |
to: T | The state corresponding to the anchor we are moving towards. |
fraction: Float | The fraction that the current position represents between from and to. |
Properties
from
val from: T
The state corresponding to the anchor we are moving away from.
to
val to: T
The state corresponding to the anchor we are moving towards.