handleThumbPressUpdateHorizontal method

  1. @protected
  2. @mustCallSuper
void handleThumbPressUpdateHorizontal(
  1. Offset position
)

Handler called when a currently active long press gesture moves.

Updates the position of the child scrollable.

Implementation

@protected
@mustCallSuper
void handleThumbPressUpdateHorizontal(Offset position) {
  Offset localPosition = position.toLocal(context);
  if (_lastDragUpdateOffsetH == localPosition) {
    return;
  }
  if (!physics.shouldAcceptUserOffset(getScrollMetricsH(
      controlInterface.getTransform(),
      controlInterface.getViewport(),
      controlInterface.getContent()))) {
    return;
  }
  updateHorizontalScrollPosition(localPosition);
  _lastDragUpdateOffsetH = localPosition;
}