handlePointerDown method

  1. @override
void handlePointerDown(
  1. MouseMsg event,
  2. Offset localPosition
)
override

Called when a pointer-down event occurs.

Implementation

@override
void handlePointerDown(MouseMsg event, Offset localPosition) {
  super.handlePointerDown(event, localPosition);
  _downGlobal = Offset(event.x.toDouble(), event.y.toDouble());
  _downLocal = localPosition;

  addCmd(
    onTapDown?.call(
      TapDownDetails(
        globalPosition: _downGlobal!,
        localPosition: _downLocal!,
        button: event.button,
        ctrl: event.ctrl,
        alt: event.alt,
        shift: event.shift,
      ),
    ),
  );
}