handleThumbPressStart method

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

Handler called when a long press gesture has started.

Begins the fade out animation and initializes dragging the scrollbar thumb.

Implementation

@protected
@mustCallSuper
void handleThumbPressStart(Offset localPosition) {
  assert(_debugCheckHasValidScrollPosition());
  _cachedController = _effectiveScrollController;
  final Axis? direction = getScrollbarDirection();
  if (direction == null) {
    return;
  }
  _fadeoutTimer?.cancel();
  _fadeoutAnimationController.forward();
  _startDragScrollbarAxisOffset = localPosition;
  _lastDragUpdateOffset = localPosition;
  _startDragThumbOffset = scrollbarPainter.getThumbScrollOffset();
  _thumbDragging = true;
}