onDismiss property

VoidCallback onDismiss

The handler for SemanticsAction.dismiss.

This is a request to dismiss the currently focused node.

TalkBack users on Android can trigger this action in the local context menu, and VoiceOver users on iOS can trigger this action with a standard gesture or menu option.

Implementation

VoidCallback get onDismiss => _onDismiss;
void onDismiss= (VoidCallback handler)

Implementation

set onDismiss(VoidCallback handler) {
  if (_onDismiss == handler)
    return;
  final bool hadValue = _onDismiss != null;
  _onDismiss = handler;
  if ((handler != null) == hadValue)
    markNeedsSemanticsUpdate();
}