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
e38836b2
Commit
e38836b2
authored
Nov 25, 2020
by
Mathias Cochet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Permission status added.
parent
8d1aa526
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionConstants.java
+1
-1
permission_handler_platform_interface/lib/src/permission_status.dart
+7
-7
permission_handler_platform_interface/pubspec.yaml
+1
-1
No files found.
permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionConstants.java
View file @
e38836b2
...
@@ -63,7 +63,7 @@ final class PermissionConstants {
...
@@ -63,7 +63,7 @@ final class PermissionConstants {
static
final
int
PERMISSION_STATUS_GRANTED
=
1
;
static
final
int
PERMISSION_STATUS_GRANTED
=
1
;
static
final
int
PERMISSION_STATUS_RESTRICTED
=
2
;
static
final
int
PERMISSION_STATUS_RESTRICTED
=
2
;
static
final
int
PERMISSION_STATUS_NOT_DETERMINED
=
3
;
static
final
int
PERMISSION_STATUS_NOT_DETERMINED
=
3
;
static
final
int
PERMISSION_STATUS_NEVER_ASK_AGAIN
=
4
;
static
final
int
PERMISSION_STATUS_NEVER_ASK_AGAIN
=
5
;
@Retention
(
RetentionPolicy
.
SOURCE
)
@Retention
(
RetentionPolicy
.
SOURCE
)
@IntDef
({
@IntDef
({
...
...
permission_handler_platform_interface/lib/src/permission_status.dart
View file @
e38836b2
...
@@ -17,15 +17,15 @@ enum PermissionStatus {
...
@@ -17,15 +17,15 @@ enum PermissionStatus {
/// *Only supported on iOS.*
/// *Only supported on iOS.*
restricted
,
restricted
,
///User has authorized this application for limited access.
/// *Only supported on iOS (iOS14+).*
limited
,
/// The user denied access to the requested feature and selected to never
/// 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
/// again show a request for this permission. The user may still change the
/// permission status in the settings.
/// permission status in the settings.
/// *Only supported on Android.*
/// *Only supported on Android.*
permanentlyDenied
,
permanentlyDenied
,
///User has authorized this application for limited access.
/// *Only supported on iOS (iOS14+).*
limited
,
}
}
extension
PermissionStatusValue
on
PermissionStatus
{
extension
PermissionStatusValue
on
PermissionStatus
{
...
@@ -40,9 +40,9 @@ extension PermissionStatusValue on PermissionStatus {
...
@@ -40,9 +40,9 @@ extension PermissionStatusValue on PermissionStatus {
case
PermissionStatus
.
undetermined
:
case
PermissionStatus
.
undetermined
:
return
3
;
return
3
;
case
PermissionStatus
.
permanentlyDenied
:
case
PermissionStatus
.
permanentlyDenied
:
return
4
;
case
PermissionStatus
.
limited
:
return
5
;
return
5
;
case
PermissionStatus
.
limited
:
return
4
;
default
:
default
:
throw
UnimplementedError
();
throw
UnimplementedError
();
}
}
...
@@ -54,8 +54,8 @@ extension PermissionStatusValue on PermissionStatus {
...
@@ -54,8 +54,8 @@ extension PermissionStatusValue on PermissionStatus {
PermissionStatus
.
granted
,
PermissionStatus
.
granted
,
PermissionStatus
.
restricted
,
PermissionStatus
.
restricted
,
PermissionStatus
.
undetermined
,
PermissionStatus
.
undetermined
,
PermissionStatus
.
permanentlyDenied
,
PermissionStatus
.
limited
,
PermissionStatus
.
limited
,
PermissionStatus
.
permanentlyDenied
,
][
value
];
][
value
];
}
}
}
}
...
...
permission_handler_platform_interface/pubspec.yaml
View file @
e38836b2
...
@@ -3,7 +3,7 @@ description: A common platform interface for the permission_handler plugin.
...
@@ -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
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
# 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
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version
:
2.0.
1
version
:
2.0.
2
dependencies
:
dependencies
:
flutter
:
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