mousePosition property

Point<num>? mousePosition

The position of the mouse relative to the local coordinate system of the display object.

Implementation

Point<num>? get mousePosition {
  final stage = this.stage;
  if (stage == null) return null;
  final localPoint = Point<num>(0.0, 0.0);
  return globalToLocal(stage.mousePosition, localPoint);
}