androidx.compose.animation.core
DeferredTransitionStateExperimental
Class · from org.jetbrains.compose.animation:animation-core:1.12.2
No hand-written docs yet.
A TransitionState that supports a deferred phase before the automatic transition begins.
class DeferredTransitionState<S>(
initialState: S,
) : TransitionState<S>
Is a
How to get one
Create it
DeferredTransitionState(initialState)constructor
Properties
pendingTargetState
val pendingTargetState: S?
The target state that the transition will eventually animate to once the deferred phase ends.
Functions
defer
fun defer(targetState: S)
Updates the pendingTargetState and initiates the deferred phase.
animateTo
fun animateTo(targetState: S)
Clears the pendingTargetState and updates the targetState to the provided targetState, ending the deferred phase and starting the automatic transition animation.
Library docs
A TransitionState that supports a deferred phase before the automatic transition begins.
This state is designed for scenarios where a transition should be held in an intermediate, manually-controlled state (e.g., during a predictive back gesture) before proceeding to its final target.
While in the deferred phase (initiated by defer), the transition holds the new target as a
pendingTargetState. The actual targetState remains unchanged, keeping the transition in its
current visual state. Once animateTo is called, the pendingTargetState is cleared and the
transition proceeds to the new targetState, triggering its automatic animations.