setMousePositionWorld method

void setMousePositionWorld(
  1. Offset? position
)

Updates the mouse position in world coordinates.

This is typically called internally by the editor widget during mouse hover. Pass null when the mouse exits the canvas.

Parameters:

  • position: The mouse position in world coordinates, or null if outside canvas

Implementation

void setMousePositionWorld(Offset? position) {
  runInAction(() {
    _mousePositionWorld.value = position;
  });
}