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
5c859738
Unverified
Commit
5c859738
authored
Sep 20, 2022
by
Yannick Maljaars
Committed by
GitHub
Sep 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated permission_status.dart comments (#914)
parent
cf903f7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
permission_handler_platform_interface/lib/src/permission_status.dart
+20
-9
No files found.
permission_handler_platform_interface/lib/src/permission_status.dart
View file @
5c859738
...
...
@@ -2,7 +2,8 @@ part of permission_handler_platform_interface;
/// Defines the state of a [Permission].
enum
PermissionStatus
{
/// The user denied access to the requested feature.
/// The user denied access to the requested feature,
/// permission needs to be asked first.
denied
,
/// The user granted access to the requested feature.
...
...
@@ -21,7 +22,6 @@ enum PermissionStatus {
/// Permission to the requested feature is permanently denied, the permission
/// dialog will not be shown when requesting this permission. The user may
/// still change the permission status in the settings.
/// *Only supported on Android.*
permanentlyDenied
,
}
...
...
@@ -59,7 +59,8 @@ extension PermissionStatusValue on PermissionStatus {
/// Utility getter extensions for the [PermissionStatus] type.
extension
PermissionStatusGetters
on
PermissionStatus
{
/// If the user denied access to the requested feature.
/// If the user denied access to the requested feature,
/// permission needs to be asked first.
bool
get
isDenied
=>
this
==
PermissionStatus
.
denied
;
/// If the user granted access to the requested feature.
...
...
@@ -71,10 +72,15 @@ extension PermissionStatusGetters on PermissionStatus {
/// *Only supported on iOS.*
bool
get
isRestricted
=>
this
==
PermissionStatus
.
restricted
;
/// *On Android:*
/// If the user denied access to the requested feature and selected to never
/// again show a request for this permission. The user may still change the
/// permission status in the settings.
/// *Only supported on Android.*
/// again show a request for this permission (pre API 30) or the user denied
/// permissions for a second time (API 30 and higher).
/// The user may still change the permission status in the settings.
///
/// *On iOS:*
/// If the user has denied acces to the requested feature.
/// The user may still change the permission status in the settings
///
/// WARNING: This can only be determined AFTER requesting this permission.
/// Therefore make a `request` call first.
...
...
@@ -98,10 +104,15 @@ extension FuturePermissionStatusGetters on Future<PermissionStatus> {
/// *Only supported on iOS.*
Future
<
bool
>
get
isRestricted
async
=>
(
await
this
).
isRestricted
;
/// *On Android:*
/// If the user denied access to the requested feature and selected to never
/// again show a request for this permission. The user may still change the
/// permission status in the settings.
/// *Only supported on Android.*
/// again show a request for this permission (pre API 30) or the user denied
/// permissions for a second time (API 30 and higher).
/// The user may still change the permission status in the settings.
///
/// *On iOS:*
/// If the user has denied acces to the requested feature.
/// The user may still change the permission status in the settings
Future
<
bool
>
get
isPermanentlyDenied
async
=>
(
await
this
).
isPermanentlyDenied
;
...
...
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