isPointerOverTrack method Null safety
- Offset position,
- PointerDeviceKind kind
protected">@protected
Returns true if the provided Offset is located over the track of the RawScrollbar.
Excludes the RawScrollbar thumb.
Implementation
@protected
bool isPointerOverTrack(Offset position, PointerDeviceKind kind) {
if (_scrollbarPainterKey.currentContext == null) {
return false;
}
final Offset localOffset = _getLocalOffset(_scrollbarPainterKey, position);
return scrollbarPainter.hitTestInteractive(localOffset, kind)
&& !scrollbarPainter.hitTestOnlyThumbInteractive(localOffset, kind);
}