setSelected method

void setSelected(
  1. bool selected
)

Sets the annotation's selection state.

When true, the annotation displays selection visual feedback (border/highlight). This is typically managed by the framework, but can be called directly for custom selection logic.

Implementation

void setSelected(bool selected) {
  runInAction(() {
    _selected.value = selected;
  });
}