mediumImpact static method

Future<void> mediumImpact()

Provides a haptic feedback corresponding a collision impact with a medium mass.

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

On Android, this uses HapticFeedbackConstants.KEYBOARD_TAP.

Implementation

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