text property

String get text

Gets the current text string.

Implementation

String get text => _value.text;
set text (String newText)

Sets the current text string.

Implementation

set text(String newText) {
  final lines = newText.split('\n');
  value = TextEditingValue(
    text: newText,
    selection: TextSelection.collapsed(
      offset: newText.characters.length,
      line: lines.length - 1,
      column: lines.last.characters.length,
    ),
  );
}