onLongPress property Null safety

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 can trigger this action by double-tapping the screen without lifting the finger after the second tap.

Implementation

VoidCallback? get onLongPress => _onLongPress;
void onLongPress=(VoidCallback? value)

Implementation

set onLongPress(VoidCallback? value) {
  _addArgumentlessAction(SemanticsAction.longPress, value!);
  _onLongPress = value;
}