setZIndex method

void setZIndex(
  1. int newZIndex
)

Sets the annotation's z-index (rendering order).

Lower values are rendered first (behind), higher values last (in front). Group annotations typically use negative z-index (e.g., -1) to appear behind nodes.

Implementation

void setZIndex(int newZIndex) {
  runInAction(() {
    _zIndex.value = newZIndex;
  });
}