MutableTransitionState

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

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.

See also

Constructors

Link copied to clipboard
constructor(initialState: S)

Properties

Link copied to clipboard
open override var currentState: S

Current state of the transition. currentState is initialized to the initialState that the MutableTransitionState is constructed with.

Link copied to clipboard

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

Link copied to clipboard
open override var targetState: S

Target state of the transition. targetState is initialized to the initialState that the MutableTransitionState is constructed with.