animateFloat

fun animateFloat(transitionSpec: Segment<S>.() -> FiniteAnimationSpec<Float> = { spring() }, label: String = "float", targetValueByState: (S) -> Float): Value<Float>

Animates a Float property as part of this transition.

Return

A Value containing the current animated float.

Parameters

transitionSpec

Provides the animation spec, evaluated with the current Segment as receiver for directional spec selection. Defaults to spring.

label

Optional label for this animation, used for tracing attribution.

targetValueByState

Maps the target state to the target float value.