🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

Transition.TransitionAnimationState

Each animation created using animateFloat, animateDp, etc is represented as a TransitionAnimationState in Transition.

Source set: Common
public inner class TransitionAnimationState<T, V : AnimationVector> internal constructor(
        initialValue: T,
        initialVelocityVector: V,
        public val typeConverter: TwoWayConverter<T, V>,
        public val label: String,
    ) : State<T>

Each animation created using animateFloat, animateDp, etc is represented as a TransitionAnimationState in Transition.

Properties

animationSpec

Source set: Common
public var animationSpec: FiniteAnimationSpec<T> by mutableStateOf(defaultSpring)

AnimationSpec that is used for current animation run. This can change when targetState changes.

animation

Source set: Common
public var animation: TargetBasedAnimation<T, V> by
            mutableStateOf(
                TargetBasedAnimation(
                    animationSpec,
                    typeConverter,
                    initialValue,
                    targetValue,
                    initialVelocityVector,
                )
            )

All the animation configurations including initial value/velocity & target value for animating from currentState to targetState are captured in animation.

value

Source set: Common
override var value: T by mutableStateOf(initialValue)

Functions

toString

Source set: Common
override fun toString(): String