jump method

void jump(
  1. double value, {
  2. double velocity = 0,
})

Jumps to value and keeps moving at velocity towards the target.

Implementation

void jump(double value, {double velocity = 0}) {
  // With reduced motion there's no bounce or fling: it rests where it's going.
  if (reduceMotion) {
    set(_target, instant: true);
    return;
  }
  _value = value;
  _velocity = velocity;
  notifyListeners();
  if (!_ticker.isActive && (value != _target || velocity != 0)) {
    _last = Duration.zero;
    _ticker.start();
  }
}