animateToThreshold method

  1. @protected
Future<void> animateToThreshold()

Implementation

@protected
Future<void> animateToThreshold() async {
  _isRefreshing = true;
  _distancePulled = threshold;
  _verticalOffset = calculateVerticalOffset();
  notifyListeners();
  try {
    await delegate.animateToThreshold();
  } finally {
    if (!_isDisposed) {
      _distancePulled = threshold;
      delegate.snapTo(1.0);
      _verticalOffset = calculateVerticalOffset();
      notifyListeners();
    }
  }
}