clearText method
void
clearText()
Clears the text, composing attributions, composing region, and moves the collapsed selection to the start of the now empty text controller.
Implementation
void clearText() {
_text = AttributedText();
_selection = const TextSelection.collapsed(offset: 0);
_composingAttributions.clear();
_composingRegion = TextRange.empty;
notifyListeners();
}