animateTo method
Animates to target with optional duration and curve overrides.
Returns a Cmd that schedules the first animation frame tick.
Implementation
Cmd animateTo(
double target, {
Duration? duration,
Curve curve = Curves.linear,
}) {
_targetValue = target.clamp(lowerBound, upperBound);
_startValue = _value;
_curve = curve;
if (duration != null) this.duration = duration;
_status = target >= _value
? AnimationStatus.forward
: AnimationStatus.reverse;
_startTime = null;
_repeating = false;
_notifyStatusListeners();
return _scheduleTick();
}