onTap property

VoidCallback onTap

The handler for SemanticsAction.tap.

This is the semantic equivalent of a user briefly tapping the screen with the finger without moving it. For example, a button should implement this action.

VoiceOver users on iOS and TalkBack users on Android can trigger this action by double-tapping the screen while an element is focused.

Implementation

VoidCallback get onTap => _onTap;
void onTap= (VoidCallback handler)

Implementation

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