handleThumbPressUpdate method

  1. @protected
  2. @mustCallSuper
void handleThumbPressUpdate(
  1. Offset localPosition
)

Handler called when a currently active long press gesture moves.

Updates the position of the child scrollable.

Implementation

@protected
@mustCallSuper
void handleThumbPressUpdate(Offset localPosition) {
  assert(_debugCheckHasValidScrollPosition());
  if (_lastDragUpdateOffset == localPosition) {
    return;
  }
  final ScrollPosition position = _cachedController!.position;
  if (!position.physics.shouldAcceptUserOffset(position)) {
    return;
  }
  final Axis? direction = getScrollbarDirection();
  if (direction == null) {
    return;
  }
  _updateScrollPosition(localPosition);
  _lastDragUpdateOffset = localPosition;
}