androidx.compose.animation.core

MutableTransitionState

Class · from org.jetbrains.compose.animation:animation-core:1.12.2

No hand-written docs yet.

MutableTransitionState contains two fields: currentState and targetState. currentState is initialized to the provided initialState, and can only be mutated by a Transition. targetState is also initialized to initialState. It can be mutated to alter the course of a transition animation that is created with the MutableTransitionState using rememberTransition. Both currentState and targetState are backed by a State object.

class MutableTransitionState<S>(
    initialState: S,
) : TransitionState<S>

Is a

How to get one

Create it

Ready-made values and functions that return it

Properties

isIdle

val isIdle: Boolean

isIdle returns whether the transition has finished running. This will return false once the targetState has been set to a different value than currentState.

Library docs

MutableTransitionState contains two fields: currentState and targetState. currentState is initialized to the provided initialState, and can only be mutated by a Transition. targetState is also initialized to initialState. It can be mutated to alter the course of a transition animation that is created with the MutableTransitionState using rememberTransition. Both currentState and targetState are backed by a State object.