updateNode method

void updateNode(
  1. String nodeId,
  2. List<SpellAnnotation> annotations
)

Replaces all annotations for nodeId with annotations.

Implementation

void updateNode(String nodeId, List<SpellAnnotation> annotations) {
  if (annotations.isEmpty) {
    _annotations.remove(nodeId);
  } else {
    _annotations[nodeId] = annotations;
  }
}