onSetText property

SetTextHandler? onSetText

The handler for SemanticsAction.setText.

This handler is invoked when the user wants to replace the current text in the text field with a new text.

Voice access users can trigger this handler by speaking "type " to their Android devices.

Implementation

SetTextHandler? get onSetText => _onSetText;
void onSetText=(SetTextHandler? value)

Implementation

set onSetText(SetTextHandler? value) {
  assert(value != null);
  _addAction(SemanticsAction.setText, (Object? args) {
    assert(args != null && args is String);
    final String text = args! as String;
    value!(text);
  });
  _onSetText = value;
}