nearestTo method

T? nearestTo(
  1. Vector2 position
)

The element nearest to position, or null if this is empty.

position is in scene space, so the elements need not share a parent.

Implementation

T? nearestTo(Vector2 position) => _nearestTo(position);