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