animateColor
Animates a color as part of this Transition, which owns the animation's lifetime.
targetValueByState is composable, so it may read state or a composition local. A new color it returns for a state the transition has already reached is also animated to.
Return
a state holding the color of the current frame.
Parameters
how the value moves through time between a given pair of states; a spring for every pair by default.
names this animation among the others of the same transition.
the color each state of the transition stands for.
Animates a color from initialValue to targetValue and repeats for as long as this InfiniteTransition stays in the composition, restarting or reversing on each iteration according to the RepeatMode of animationSpec.
Changing initialValue or targetValue restarts the animation at the new endpoints.
Return
a state holding the color of the current frame.
Parameters
the color each iteration starts from.
the color each iteration runs to.
how the value moves through time, and how each iteration follows the last.
names this animation among the others of the same transition.