vibrate static method

Future<void> vibrate()

Trigger vibrate haptic feedback

Implementation

static Future<void> vibrate() async {
  try {
    await SystemChannels.platform.invokeMethod('HapticFeedback.vibrate');
  } catch (e) {
    // Ignore errors on platforms that don't support haptic feedback
  }
}