isPointerOverScrollbar method Null safety

  1. @protected
bool isPointerOverScrollbar (
  1. Offset position
)

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

Implementation

@protected
bool isPointerOverScrollbar(Offset position) {
  if (_scrollbarPainterKey.currentContext == null) {
    return false;
  }
  final Offset localOffset = _getLocalOffset(_scrollbarPainterKey, position);
  return scrollbarPainter.hitTestInteractive(localOffset);
}