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
fb752f41
Unverified
Commit
fb752f41
authored
Feb 26, 2021
by
Maurits van Beusekom
Committed by
GitHub
Feb 26, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #460 from Baseflow/remove_undetermined
Removed PermissionStatus.undetermined
parents
f557526b
4d6addbe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
12 deletions
+6
-12
permission_handler_platform_interface/CHANGELOG.md
+4
-0
permission_handler_platform_interface/lib/src/permission_status.dart
+1
-11
permission_handler_platform_interface/pubspec.yaml
+1
-1
No files found.
permission_handler_platform_interface/CHANGELOG.md
View file @
fb752f41
## 3.0.0+1
*
**BREAKING**
: Removed PermissionStatus.undetermined. This is now replaced by PermissionStatus.denied.
## 3.0.0
*
Migrated to null safety.
...
...
permission_handler_platform_interface/lib/src/permission_status.dart
View file @
fb752f41
...
...
@@ -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
;
...
...
permission_handler_platform_interface/pubspec.yaml
View file @
fb752f41
...
...
@@ -3,7 +3,7 @@ description: A common platform interface for the permission_handler plugin.
homepage
:
https://github.com/baseflow/flutter-permission-handler/tree/master/permission_handler_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version
:
3.0.0
version
:
3.0.0
+1
dependencies
:
flutter
:
...
...
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