vibrate static method

Future<void> vibrate(
  1. HapticsType type
)

Performs haptic feedback of HapticsType on the device. Performs nothing if the platform is not supported.

Implementation

static Future<void> vibrate(HapticsType type) async {
  if (!isPlatformSupported) {
    return;
  }

  return HapticFeedbackPlatform.instance.vibrate(type);
}