Google is committed to advancing racial equity for Black communities. See how.

AnimatedValueModel

@Stable class AnimatedValueModel<T, V : AnimationVector> : AnimatedValue<T, V>
kotlin.Any
   ↳ androidx.compose.animation.core.BaseAnimatedValue<T, V>
   ↳ androidx.compose.animation.core.AnimatedValue<T, V>
   ↳ androidx.compose.animation.AnimatedValueModel

Model class for AnimatedValue. This class tracks the value field change, so that composables that read from this field can get promptly recomposed as the animation updates the value.

Summary

Public constructors
<init>(initialValue: T, typeConverter: TwoWayConverter<T, V>, clock: AnimationClockObservable, visibilityThreshold: T? = null)

Model class for AnimatedValue.

Inherited functions
Inherited extension functions
From androidx.compose.material
Unit
AnimatedValue<Dp, *>.animateElevation(from: Interaction? = null, to: Interaction? = null, target: Dp)

Animates the Dp value of this between from and tos, to target.

Properties
T

Current value of the animation.

Inherited properties

Public constructors

<init>

AnimatedValueModel(
    initialValue: T,
    typeConverter: TwoWayConverter<T, V>,
    clock: AnimationClockObservable,
    visibilityThreshold: T? = null)

Model class for AnimatedValue. This class tracks the value field change, so that composables that read from this field can get promptly recomposed as the animation updates the value.

Parameters
initialValue: T The overridden value field that can only be mutated by animation
typeConverter: TwoWayConverter<T, V> The converter for converting any value of type T to an AnimationVector type
clock: AnimationClockObservable The animation clock that will be used to drive the animation
visibilityThreshold: T? = null Threshold at which the animation may round off to its target value.

Properties

value

var value: T

Current value of the animation.