Commit 2c1a2b35 by Neal Soni

added accessNotificationPolicy to permissions.dart + fixed tests

parent 5b394f2d
......@@ -72,9 +72,6 @@ post_install do |installer|
## dart: PermissionGroup.notification
'PERMISSION_NOTIFICATIONS=1',
## dart: PermissionGroup.criticalAlerts
'PERMISSION_CRITICAL_ALERTS=1',
## dart: PermissionGroup.mediaLibrary
'PERMISSION_MEDIA_LIBRARY=1',
......@@ -86,6 +83,9 @@ post_install do |installer|
## dart: PermissionGroup.appTrackingTransparency
'PERMISSION_APP_TRACKING_TRANSPARENCY=1'
## dart: PermissionGroup.criticalAlerts
'PERMISSION_CRITICAL_ALERTS=1',
]
end
......
......@@ -147,6 +147,11 @@ class Permission {
///iOS: Notifications that override your ringer
static const criticalAlerts = Permission._(26);
///Android: Allows the user to access the notification policy of the phone.
/// EX: Allows app to turn on and off do-not-disturb.
///iOS: Nothing
static const accessNotificationPolicy = Permission._(27);
/// Returns a list of all possible [PermissionGroup] values.
static const List<Permission> values = <Permission>[
calendar,
......@@ -175,7 +180,8 @@ class Permission {
systemAlertWindow,
requestInstallPackages,
appTrackingTransparency,
criticalAlerts
criticalAlerts,
accessNotificationPolicy,
];
static const List<String> _names = <String>[
......@@ -205,7 +211,8 @@ class Permission {
'systemAlertWindow',
'requestInstallPackages',
'appTrackingTransparency',
'criticalAlerts'
'criticalAlerts',
'accessNotificationPolicy',
];
@override
......
......@@ -6,7 +6,7 @@ void main() {
() {
final values = Permission.values;
expect(values.length, 26);
expect(values.length, 28);
});
test('check if byValue returns corresponding PermissionGroup value', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment