NotificationPermission enum

Constants for requesting authorization to interact with the user thought notifications Alert Alerts are notifications with high priority that pops up on the user screen. Notifications with normal priority only shows the icon on status bar. Sound Sound allows the ability to play sounds for new displayed notifications. The notification sounds are limited to a few seconds and if you pretend to play a sound for more time, you must consider to play a background sound to do it simultaneously with the notification. Badge Badge is the ability to display a badge alert over the app icon to alert the user about updates. The badges can be displayed on numbers or small dots, depending of platform or what the user defined in the device settings. Both Android and iOS can show numbers on badge, depending of its version and distribution. Light The ability to display colorful small lights, blanking on the device while the screen is off to alert the user about updates. Only a few Android devices have this feature. Vibration The ability to vibrate the device to alert the user about updates. PreciseAlarms Precise alarms allows the scheduled notifications to be displayed at the expected time. This permission can be revoke by special device modes, such as baterry save mode, etc. Some manufactures can disable this feature if they decide that your app is consumpting many computational resources and decressing the baterry life (and without changing the permission status for your app). So, you must take in consideration that some schedules can be delayed or even not being displayed, depending of what platform are you running. You can increase the chances to display the notification at correct time, enable this permission and setting the correct notification category, but you never gonna have 100% sure about it. FullScreenIntent The ability to show the notifications on pop up even if the user is using another app. CriticalAlert Critical alerts is a special permission that allows to play sounds and vibrate for new notifications displayed, even if the device is in Do Not Disturbe / Silent mode. For iOS, you must request Apple a authorization to your app use it. OverrideDnD Override DnD allows the notification to decrease the "Do Not Disturbe"/ Silent mode level enable to display critical alerts for Alarm and Call notifications. For Android, you must require the user consent to use it. For iOS, this permission is always enabled with CriticalAlert. Provisional (Only has effect on iOS) The ability to display notifications for a period of time without the user consent. Car The ability to display notifications while the device is in car mode.

Inheritance

Constructors

NotificationPermission()
const

Values

Alert → const NotificationPermission

Alert Alerts are notifications with high priority that pops up on the user screen. Notifications with normal priority only shows the icon on status bar.

Sound → const NotificationPermission

Sound Sound allows the ability to play sounds for new displayed notifications. The notification sounds are limited to a few seconds and if you pretend to play a sound for more time, you must consider to play a background sound to do it simultaneously with the notification.

Badge → const NotificationPermission

Badge Badge is the ability to display a badge alert over the app icon to alert the user about updates. The badges can be displayed on numbers or small dots, depending of platform or what the user defined in the device settings. Both Android and iOS can show numbers on badge, depending of its version and distribution.

Light → const NotificationPermission

Light The ability to display colorful small lights, blanking on the device while the screen is off to alert the user about updates. Only a few Android devices have this feature.

Vibration → const NotificationPermission

Vibration The ability to vibrate the device to alert the user about updates.

FullScreenIntent → const NotificationPermission

FullScreenIntent The ability to show the notifications on pop up even if the user is using another app.

PreciseAlarms → const NotificationPermission

PreciseAlarms Precise alarms allows the scheduled notifications to be displayed at the expected time. This permission can be revoke by special device modes, such as baterry save mode, etc. Some manufactures can disable this feature if they decide that your app is consumpting many computational resources and decressing the baterry life (and without changing the permission status for your app). So, you must take in consideration that some schedules can be delayed or even not being displayed, depending of what platform are you running. You can increase the chances to display the notification at correct time, enable this permission and setting the correct notification category, but you never gonna have 100% sure about it.

CriticalAlert → const NotificationPermission

CriticalAlert Critical alerts is a special permission that allows to play sounds and vibrate for new notifications displayed, even if the device is in Do Not Disturbe / Silent mode. For iOS, you must request Apple a authorization to your app use it.

OverrideDnD → const NotificationPermission

OverrideDnD Override DnD allows the notification to decrease the "Do Not Disturbe"/ Silent mode level enable to display critical alerts for Alarm and Call notifications. For Android, you must require the user consent to use it. For iOS, this permission is always enabled with CriticalAlert.

Provisional → const NotificationPermission

Provisional (Only has effect on iOS) The ability to display notifications temporarially without the user consent.

Car → const NotificationPermission

Car The ability to display notifications while the device is in car mode.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<NotificationPermission>
A constant List of the values in this enum, in order of their declaration.