onPaste property Null safety

VoidCallback? onPaste

The handler for SemanticsAction.paste.

This is a request to paste the current content of the clipboard.

TalkBack users on Android can trigger this action from the local context menu of a text field, for example.

Implementation

VoidCallback? get onPaste => _onPaste;
void onPaste=(VoidCallback? handler)

Implementation

set onPaste(VoidCallback? handler) {
  if (_onPaste == handler)
    return;
  final bool hadValue = _onPaste != null;
  _onPaste = handler;
  if ((handler != null) != hadValue)
    markNeedsSemanticsUpdate();
}