setText method

void setText(
  1. String newText
)

Sets the buffer to new text, cursor at end.

Implementation

void setText(String newText) {
  final value = _truncate(newText, maxLength ?? newText.length);
  _replace(value, value.length);
}