focusedEditable property

EditableTextState? focusedEditable

The State of the current EditableText client of the onscreen keyboard.

Setting this property to a new value causes the given EditableTextState to focus itself and request the keyboard to establish a TextInputConnection.

Callers must pump an additional frame after setting this property to complete the focus change.

Instead of setting this directly, consider using WidgetTester.showKeyboard.

Implementation

//
// TODO(ianh): We should just remove this property and move the call to
// requestKeyboard to the WidgetTester.showKeyboard method.
EditableTextState? get focusedEditable => _focusedEditable;
void focusedEditable=(EditableTextState? value)

Implementation

set focusedEditable(EditableTextState? value) {
  if (_focusedEditable != value) {
    _focusedEditable = value;
    value?.requestKeyboard();
  }
}