Adapter class

Adapters provide a mechanism to drive an animation from an arbitrary source. For example, synchronizing an animation with a scroll, controlling an animation with a slider input, or progressing an animation based on the time of day.

Adapters must expose an init method which accepts the AnimationController used by an Animate instance, and adds the logic to drive it from an external source by updating its value (0-1). See the included adapters for implementation examples.

Adapters should be immutable, so that they can be shared between animations.

Implementers
Annotations

Constructors

Adapter({bool? animated})
const

Properties

animated bool
Indicates whether the adapter should animate to new values. If false, it will jump to the new value, if true it will animate to the value using a duration calculated from the animation's total duration and the value change. Defaults to false.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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