Animation class final

The one unit of motion: everything visual — transforms, opacity, color, and pixel post-effects — is an Animation in the same .animate([...]) list.

An animation pairs what changes (its effect) with when it plays: the phase within the element's window, the timing (tween or spring), a delay, and a Trigger. It deliberately shadows Flutter's Animation; library code needing Flutter's imports it with a prefix.

Text('Hi').animate([Animation.from(const Keyframe(opacity: 0, y: 0.3))]);
Annotations

Constructors

Animation.along(Path path, {bool orient = true, AnimationPhase? phase, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label})
Travels along path (logical px from the natural position); orient rotates the child to face the direction of travel. Defaults to an enter.
Animation.custom(AnimationEffect effect, {AnimationPhase? phase, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label})
Wraps your own AnimationEffect; defaults to an enter.
const
Animation.from(Keyframe from, {AnimationPhase? phase, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label})
Animates from from to the natural state — an enter.
Animation.fromTo(Keyframe from, Keyframe to, {AnimationPhase? phase, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label})
Animates from from to to; defaults to an enter unless phase says otherwise.
Animation.keyframes(List<Keyframe> stops, {List<Curve>? easings, List<Time>? at, AnimationPhase? phase, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger trigger = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label})
Travels through stops in order; defaults to an enter.
Animation.to(Keyframe to, {AnimationPhase? phase, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label})
Animates from the natural state to to — an exit.

Properties

at Trigger
Relative to what it starts; defaults to Trigger.auto.
final
delay Time
Offset applied after the trigger fires; defaults to Time.zero.
final
duration Time?
How long it runs; null inherits the merged Defaults duration. Ignored when spring is set.
final
ease Curve?
The curve shaping progress; null inherits the merged Defaults ease. Ignored when spring is set.
final
effect AnimationEffect
What this animation does to its target — built-in or custom.
final
hashCode int
The hash code for this object.
no setterinherited
label String?
Names this animation so others can chain off it; diagnostics only.
final
phase AnimationPhase
When it plays within the element's window: enter, exit, or during. Inferred — from → enter, to → exit, continuous presets → during.
final
repeat Repeat?
Loops the animation inside its span; null plays a single pass.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spring Spring?
Physics-driven timing; when set it wins over duration/ease and the settle time becomes the animation's span.
final
stagger Stagger?
Distributes start offsets across a multi-child target; null inherits.
final
timing Timing?
The anatomy view of the three timing fields: spring wins; an explicit duration makes a Tween (with ease or Ease.smooth); all-unset is null, deferring to the inherited Defaults.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

bloom(double amount, {Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Bleeds a soft glow out of the element's bright areas — a pixel post-effect.
blurIn({double sigma = 12, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Sharpens in from a gaussian blur of sigma logical pixels — an enter.
blurOut({double sigma = 12, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Blurs out to a gaussian blur of sigma logical pixels — an exit.
chromatic(double px, {Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Splits the red/blue channels by px logical pixels for a lens-fringe aberration — a pixel post-effect.
color({required Color to, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Tints toward to at the end of the window — color as data, an exit.
drift({Edge to = Edge.right, double distance = 0.1, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Drifts toward the to edge across the whole window — a slow one-pass ambient slide.
fadeIn({Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Fades in from fully transparent to the natural opacity — an enter.
fadeOut({Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Fades out from the natural opacity to fully transparent — an exit.
float({double amplitude = 0.04, double frequency = 0.4, String? seed, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Floats gently up and down forever — a continuous ambient motion.
glitchIn({Edge from = Edge.left, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Glitches in: a brief digital tear that resolves to the natural frame — a pixel post-effect, an enter.
gradientShift({required List<Color> to, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Shifts the enclosing Background.gradient/radial toward to — an enter, start-anchored so relative delay/duration arithmetic holds and Trigger.after fires when the shift completes.
grain(double amount, {Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Lays seeded monochrome film grain over the element — a pixel post-effect.
kenBurns({double zoom = 1.15, Edge pan = Edge.left, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Slowly zooms to zoom while panning toward the pan edge — the classic Ken Burns documentary move, one pass across the window.
maskWipe({WipeShape shape = WipeShape.circle, Alignment origin = Alignment.center, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Reveals the element through a growing shape mask — an enter.
parallax({double depth = 0.2, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Drifts the element by depth across the scene for a parallax layer — a transform-class effect.
particles(Particles spec, {Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Lays a deterministic field of particles over the element — a pixel post-effect.
pop({double overshoot = 1.1, Spring? spring, Time? duration, Curve? ease, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Pops in from scale 0 on a spring — an enter, springy by default.
pulse({AudioBand? on, double gain = 1.0, Anchor? track, double min = 0.97, double max = 1.03, Time period = const Time.seconds(1.2), Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Breathes scale forever — a continuous ambient pulse, in two forms.
scaleIn({double from = 0.85, Spring? spring, Time? duration, Curve? ease, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Scales in from from (a scale factor, 1 = natural size) — an enter on Spring.snappy by default.
scaleY({required AudioBand on, double gain = 1.0, Anchor? track, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Scales the element's height by an audio band's energy forever — a spectrum-reactive during animation.
scanlines({Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Overlays thin dark horizontal lines for a CRT/VHS look — a pixel post-effect taking no required parameter.
shader(String asset, {Map<String, Object> uniforms = const {}, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Paints a custom fragment shader over the element — an experimental pixel post-effect.
slideFade({Edge from = Edge.bottom, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Slides in from the from edge while fading in — an enter.
slideIn({Edge from = Edge.bottom, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Slides in from one element-size off the from edge — an enter.
slideOut({Edge to = Edge.top, Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Slides out to one element-size off the to edge — an exit.
spin({Time per = const Time.seconds(4), Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Spins one full turn every per forever — a continuous rotation.
vignette(double amount, {Time? duration, Curve? ease, Spring? spring, Time delay = Time.zero, Trigger at = Trigger.auto, Stagger? stagger, Repeat? repeat, String? label}) Animation
Darkens the edges toward the center — a pixel post-effect.