onSetText property Null safety

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? handler)

Implementation

set onSetText(SetTextHandler? handler) {
  if (_onSetText == handler)
    return;
  final bool hadValue = _onSetText != null;
  _onSetText = handler;
  if ((handler != null) != hadValue)
    markNeedsSemanticsUpdate();
}