Skip to Content
API ReferenceAnimationBuilder

AnimationBuilder

An element that creates and drives an AnimationController and rebuilds its subtree on every animation tick. The controller’s curved value is passed to the builder delegate so that descendant elements can read the current animation progress. The controller is created automatically when the element mounts and disposed when the element unmounts. Call Forward or Reverse from within the builder or from a gesture handler to start playback.

Constructor

AnimationBuilder

Creates a new animation builder.

ParameterDescription
durationDuration of one full pass in seconds. Must be greater than zero.
builderA delegate that receives the build context and the animation controller and returns the element subtree.
curveThe easing curve to apply. Defaults to Linear when null.
keyAn optional key for reconciliation identity.

Properties

Builder

A delegate that receives the build context and the animation controller, and returns the element subtree. The controller’s Value reflects the current curved progress in [0, 1].

Curve

The easing curve applied to the raw linear progress before passing the value to Builder. Defaults to Linear when null.

Duration

Duration of one full forward or reverse pass in seconds. Must be greater than zero.

Methods

CreateState

Last updated on