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
aa4819a4
Commit
aa4819a4
authored
Feb 26, 2021
by
daniel.roek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed PermissionStatus.undetermined
parent
f557526b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
11 deletions
+2
-11
permission_handler_platform_interface/CHANGELOG.md
+1
-0
permission_handler_platform_interface/lib/src/permission_status.dart
+1
-11
No files found.
permission_handler_platform_interface/CHANGELOG.md
View file @
aa4819a4
## 3.0.0
*
Migrated to null safety.
*
Removed PermissionStatus.undetermined. This is now replaced by PermissionStatus.denied.
## 2.0.2
...
...
permission_handler_platform_interface/lib/src/permission_status.dart
View file @
aa4819a4
...
...
@@ -2,9 +2,6 @@ part of permission_handler_platform_interface;
/// Defines the state of a [Permission].
enum
PermissionStatus
{
/// The permission wasn't requested yet.
undetermined
,
/// The user granted access to the requested feature.
granted
,
...
...
@@ -37,7 +34,7 @@ extension PermissionStatusValue on PermissionStatus {
return
1
;
case
PermissionStatus
.
restricted
:
return
2
;
case
PermissionStatus
.
undetermin
ed
:
case
PermissionStatus
.
deni
ed
:
return
3
;
case
PermissionStatus
.
permanentlyDenied
:
return
5
;
...
...
@@ -53,7 +50,6 @@ extension PermissionStatusValue on PermissionStatus {
PermissionStatus
.
denied
,
PermissionStatus
.
granted
,
PermissionStatus
.
restricted
,
PermissionStatus
.
undetermined
,
PermissionStatus
.
limited
,
PermissionStatus
.
permanentlyDenied
,
][
value
];
...
...
@@ -61,9 +57,6 @@ extension PermissionStatusValue on PermissionStatus {
}
extension
PermissionStatusGetters
on
PermissionStatus
{
/// If the permission was never requested before.
bool
get
isUndetermined
=>
this
==
PermissionStatus
.
undetermined
;
/// If the user granted access to the requested feature.
bool
get
isGranted
=>
this
==
PermissionStatus
.
granted
;
...
...
@@ -86,9 +79,6 @@ extension PermissionStatusGetters on PermissionStatus {
}
extension
FuturePermissionStatusGetters
on
Future
<
PermissionStatus
>
{
/// If the permission was never requested before.
Future
<
bool
>
get
isUndetermined
async
=>
(
await
this
).
isUndetermined
;
/// If the user granted access to the requested feature.
Future
<
bool
>
get
isGranted
async
=>
(
await
this
).
isGranted
;
...
...
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