ValueAdapter class

Drives an Animate animation directly from a value in the range 0-1

For example, this would fade/slide in text based on the value of a Slider:

// note: Slider range defaults to 0-1
Slider(
  value: _sliderVal
  onChanged: (val) => setState(() => _sliderVal = val)),
);
Text("Hello").animate(adapter: ValueAdapter(_sliderVal))
  .fadeIn().slide();
Inheritance
Annotations

Constructors

ValueAdapter(double value, {bool? animated})

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.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
notifier ValueNotifier<double>
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value double
no getter

Methods

init(AnimationController controller) → void
inherited
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