withText method

TextAnnotation withText(
  1. String value
)

Replaces TextAnnotation.text with value.

No effect on a RICH annotation (one built with TextAnnotation.rich): richTextDelta keeps winning at render time, so the new text is stored but never drawn. The rich half is construction-only.

Implementation

TextAnnotation withText(String value) => copyWith(text: value);