Adapter class abstract

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.

animated specifies that 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.

Setting direction to Direction.forward or Direction.reverse will cause the adapter to only update if the new value is greater than or less than the current value respectively.

Adapter implementations must expose an attach 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.

Constructors

Adapter({bool? animated, Direction? direction})

Properties

animated bool
final
direction Direction?
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

attach(AnimationController controller) → void
config(AnimationController controller, double value, {ChangeNotifier? notifier, VoidCallback? listener}) → void
detach() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateValue(double value) → void

Operators

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