text property

String get text
inherited

The current string the user is editing.

Implementation

String get text => value.text;
  1. @override
set text (String newText)
override

Updates the current text to the given newText, and removes existing selection and composing range held by the controller.

Unlike TextEditingController.text, FTypeaheadController.text sets the selection to the end of the new text rather than selecting the entire text.

Implementation

@override
set text(String newText) {
  if (text != newText) {
    value = value.copyWith(
      text: newText,
      selection: TextSelection.collapsed(offset: newText.length),
      composing: TextRange.empty,
    );
  }
}