isPointerOverThumb method Null safety

  1. @protected
bool isPointerOverThumb(
  1. Offset position,
  2. PointerDeviceKind kind
)

Returns true if the provided Offset is located over the thumb of the RawScrollbar.

Implementation

@protected
bool isPointerOverThumb(Offset position, PointerDeviceKind kind) {
  if (_scrollbarPainterKey.currentContext == null) {
    return false;
  }
  final Offset localOffset = _getLocalOffset(_scrollbarPainterKey, position);
  return scrollbarPainter.hitTestOnlyThumbInteractive(localOffset, kind);
}