text property

String get text

The current text content.

Implementation

String get text => _text;
set text (String value)

Sets the full text content and resets the cursor and selection.

Implementation

set text(String value) {
  if (_text != value) {
    _text = value;
    _cursorPosition = _cursorPosition.clamp(0, _text.length);
    clearSelection();
    notifyListeners();
  }
}