isNotificationAllowed method

  1. @override
Future<bool> isNotificationAllowed()
override

Checks whether notifications are currently allowed globally on the device.

This method returns a Future that resolves to a bool value indicating whether notifications are allowed or not. If notifications are allowed, the value will be true. If notifications are not allowed, the value will be false.

This method can be used to check whether the user has globally disabled notifications for the app. If notifications are not allowed, you can use the showNotificationConfigPage() method to prompt the user to enable notifications for the app.

Implementation

@override
Future<bool> isNotificationAllowed() {
  return AwesomeNotificationsPlatform.instance.isNotificationAllowed();
}