handleThumbPressStart method Null safety

  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());
  _currentController = widget.controller ?? PrimaryScrollController.of(context);
  final Axis? direction = getScrollbarDirection();
  if (direction == null) {
    return;
  }
  _fadeoutTimer?.cancel();
  _fadeoutAnimationController.forward();
  _dragScrollbarAxisOffset = localPosition;
}