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 may trigger this action by double-tapping the screen while an element is focused.

Note: different OSes or assistive technologies may decide to interpret user inputs differently. Some may simulate real screen taps, while others may call semantics tap. One way to handle taps properly is to provide the same handler to both gesture tap and semantics tap.


final VoidCallback? onTap;