setPosition method

void setPosition(
  1. Offset newPosition
)

Sets the annotation's logical position.

This is the "true" position before grid snapping. The framework will automatically update visualPosition with the snapped value.

Use this when programmatically positioning annotations.

Implementation

void setPosition(Offset newPosition) {
  runInAction(() {
    _position.value = newPosition;
  });
}