areNotificationsEnabled method

Future<bool?> areNotificationsEnabled()

Returns whether the app can post notifications.

On Android 13 Tiramisu (API level 33) and newer, this returns whether the POST_NOTIFICATIONS permission is granted. On older versions, it returns whether the notifications are enabled (which they are by default).

See also:

Implementation

Future<bool?> areNotificationsEnabled() async =>
    await _channel.invokeMethod<bool>('areNotificationsEnabled');