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.


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


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