selectionClick static method Null safety

Future<void> selectionClick()

Provides a haptic feedback indication selection changing through discrete values.

On iOS versions 10 and above, this uses a UISelectionFeedbackGenerator. This call has no effects on iOS versions below 10.

On Android, this uses HapticFeedbackConstants.CLOCK_TICK.

Implementation

static Future<void> selectionClick() async {
  await SystemChannels.platform.invokeMethod<void>(
    'HapticFeedback.vibrate',
    'HapticFeedbackType.selectionClick',
  );
}