onLongPress property

VoidCallback? onLongPress

The handler for SemanticsAction.longPress.

This is the semantic equivalent of a user pressing and holding the screen with the finger for a few seconds without moving it.

VoiceOver users on iOS and TalkBack users on Android may trigger this action by double-tapping the screen without lifting the finger after the second tap.

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


final VoidCallback? onLongPress;