AnimationComponent values that define the timing and feel of state transitions. Pass them to withAnimation.
Spring
A spring animation with response and damping parameters. This is the most common animation type.Duration of the spring’s settle time in seconds. Lower values produce faster animations.
Damping ratio. 0 = no damping (infinite oscillation), 1 = critical damping (no bounce).
InterpolatingSpring
A spring animation defined by physical stiffness, damping, and mass for precise control.EaseIn
An ease-in timing curve that starts slow and accelerates toward the end.EaseInOut
An ease-in-out timing curve that starts and ends slow with acceleration in the middle.EaseOut
An ease-out timing curve that starts fast and decelerates toward the end.Linear
A linear timing curve with constant speed throughout.Bouncy
A spring animation with extra bounce for playful, attention-grabbing effects.Snappy
A spring animation with higher damping for a quick, responsive feel.Chainable Modifiers
All animation constructors return anAnimationComponent that supports these chainable methods:
delay
Delays the start of the animation.speed
Multiplies the animation speed.repeatCount
Repeats the animation a fixed number of times.repeatForever
Repeats the animation indefinitely.If
true, the animation reverses direction each cycle. If false, it restarts from the beginning.Combining modifiers
Notes
- Default parameter values are platform-specific and optimized for each environment.
- Spring animations (
Spring,InterpolatingSpring,Bouncy,Snappy) may overshoot their target based on damping settings. - Timing curve animations (
EaseIn,EaseInOut,EaseOut,Linear) run for a fixed duration and do not overshoot. - Use
repeatForeversparingly to avoid performance issues.
See Also
- withAnimation — wrap state changes with animation