successNotification static method

Future<void> successNotification()

Provides a haptic feedback indicating that a task or action has completed successfully.

On iOS, this uses a UINotificationFeedbackGenerator with UINotificationFeedbackTypeSuccess.

On Android, this uses HapticFeedbackConstants.CONFIRM on API levels 30 and above. This call has no effects on Android API levels below 30.

See also:

Implementation

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