boxPosition property

Offset boxPosition
final

The position of the event in box coordinates.

You can use the convertPointToNodeSpace of Node to convert the position to local coordinates.

bool handleEvent(SpriteBoxEvent event) {
  Point localPosition = convertPointToNodeSpace(event.boxPosition);
  if (event.type == PointerEventType.down) {
    // Do something!
  }
}

Implementation

final Offset boxPosition;