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
-
- Object
- Adapter
- ValueNotifierAdapter
- ValueAdapter
Constructors
- ValueAdapter(double value, {bool? animated, Direction? direction})
Properties
Methods
-
attach(
AnimationController controller) → void -
inherited
-
config(
AnimationController controller, double value, {ChangeNotifier? notifier, VoidCallback? listener}) → void -
inherited
-
detach(
) → 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
-
updateValue(
double value) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited