reverse method

Cmd reverse({
  1. double? from,
  2. Curve curve = Curves.linear,
})

Starts animating backward (toward lowerBound).

Returns a Cmd that schedules the first animation frame tick.

Implementation

Cmd reverse({double? from, Curve curve = Curves.linear}) {
  if (from != null) _value = from.clamp(lowerBound, upperBound);
  _targetValue = lowerBound;
  _startValue = _value;
  _curve = curve;
  _status = AnimationStatus.reverse;
  _startTime = null;
  _repeating = false;
  _notifyStatusListeners();
  return _scheduleTick();
}