settle method

void settle({
  1. required double velocity,
})

Settles after a scroll fling using velocity threshold 150.

Implementation

void settle({required double velocity}) {
  if (offset == 0 || offset == offsetLimit) {
    return;
  }
  final double target;
  if (velocity.abs() > 150) {
    target = velocity > 0 ? offsetLimit : 0;
  } else {
    target = collapsedFraction < 0.5 ? 0 : offsetLimit;
  }
  _animateTo(target);
}