Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
2c1a2b35
Commit
2c1a2b35
authored
Jun 10, 2021
by
Neal Soni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added accessNotificationPolicy to permissions.dart + fixed tests
parent
5b394f2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
permission_handler/example/ios/Podfile
+3
-3
permission_handler_platform_interface/lib/src/permissions.dart
+9
-2
permission_handler_platform_interface/test/src/permissions_test.dart
+1
-1
No files found.
permission_handler/example/ios/Podfile
View file @
2c1a2b35
...
@@ -72,9 +72,6 @@ post_install do |installer|
...
@@ -72,9 +72,6 @@ post_install do |installer|
## dart: PermissionGroup.notification
## dart: PermissionGroup.notification
'PERMISSION_NOTIFICATIONS=1'
,
'PERMISSION_NOTIFICATIONS=1'
,
## dart: PermissionGroup.criticalAlerts
'PERMISSION_CRITICAL_ALERTS=1'
,
## dart: PermissionGroup.mediaLibrary
## dart: PermissionGroup.mediaLibrary
'PERMISSION_MEDIA_LIBRARY=1'
,
'PERMISSION_MEDIA_LIBRARY=1'
,
...
@@ -86,6 +83,9 @@ post_install do |installer|
...
@@ -86,6 +83,9 @@ post_install do |installer|
## dart: PermissionGroup.appTrackingTransparency
## dart: PermissionGroup.appTrackingTransparency
'PERMISSION_APP_TRACKING_TRANSPARENCY=1'
'PERMISSION_APP_TRACKING_TRANSPARENCY=1'
## dart: PermissionGroup.criticalAlerts
'PERMISSION_CRITICAL_ALERTS=1'
,
]
]
end
end
...
...
permission_handler_platform_interface/lib/src/permissions.dart
View file @
2c1a2b35
...
@@ -147,6 +147,11 @@ class Permission {
...
@@ -147,6 +147,11 @@ class Permission {
///iOS: Notifications that override your ringer
///iOS: Notifications that override your ringer
static
const
criticalAlerts
=
Permission
.
_
(
26
);
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.
/// Returns a list of all possible [PermissionGroup] values.
static
const
List
<
Permission
>
values
=
<
Permission
>[
static
const
List
<
Permission
>
values
=
<
Permission
>[
calendar
,
calendar
,
...
@@ -175,7 +180,8 @@ class Permission {
...
@@ -175,7 +180,8 @@ class Permission {
systemAlertWindow
,
systemAlertWindow
,
requestInstallPackages
,
requestInstallPackages
,
appTrackingTransparency
,
appTrackingTransparency
,
criticalAlerts
criticalAlerts
,
accessNotificationPolicy
,
];
];
static
const
List
<
String
>
_names
=
<
String
>[
static
const
List
<
String
>
_names
=
<
String
>[
...
@@ -205,7 +211,8 @@ class Permission {
...
@@ -205,7 +211,8 @@ class Permission {
'systemAlertWindow'
,
'systemAlertWindow'
,
'requestInstallPackages'
,
'requestInstallPackages'
,
'appTrackingTransparency'
,
'appTrackingTransparency'
,
'criticalAlerts'
'criticalAlerts'
,
'accessNotificationPolicy'
,
];
];
@override
@override
...
...
permission_handler_platform_interface/test/src/permissions_test.dart
View file @
2c1a2b35
...
@@ -6,7 +6,7 @@ void main() {
...
@@ -6,7 +6,7 @@ void main() {
()
{
()
{
final
values
=
Permission
.
values
;
final
values
=
Permission
.
values
;
expect
(
values
.
length
,
2
6
);
expect
(
values
.
length
,
2
8
);
});
});
test
(
'check if byValue returns corresponding PermissionGroup value'
,
()
{
test
(
'check if byValue returns corresponding PermissionGroup value'
,
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment