animateTo method

void animateTo(
  1. double target, {
  2. double? fromVelocity,
})

Animates toward target, preserving current velocity. If fromVelocity is provided it overrides the current velocity.

Implementation

void animateTo(double target, {double? fromVelocity}) {
  _target = _clamp(target);
  _startSim(target: _target, fromVelocity: fromVelocity ?? velocity);
}