handleEvent method

  1. @override
void handleEvent(
  1. PointerEvent event,
  2. BoxHitTestEntry entry
)

To customize the necessary pointer events in behaviors. (e.g., CrosshairBehavior, TrackballBehavior, ZoomingBehavior).

Implementation

@override
void handleEvent(PointerEvent event, BoxHitTestEntry entry) {
  if (event is PointerMoveEvent) {
    _handlePointerMove(event);
  } else if (event is PointerHoverEvent) {
    _handlePointerHover(event);
  } else if (event is PointerCancelEvent) {
    _hideTrackball(immediately: true);
  } else if (event is PointerUpEvent) {
    _hideTrackball();
  }
}