Commit e38836b2 by Mathias Cochet

Permission status added.

parent 8d1aa526
......@@ -63,7 +63,7 @@ final class PermissionConstants {
static final int PERMISSION_STATUS_GRANTED = 1;
static final int PERMISSION_STATUS_RESTRICTED = 2;
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)
@IntDef({
......
......@@ -17,15 +17,15 @@ enum PermissionStatus {
/// *Only supported on iOS.*
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
/// again show a request for this permission. The user may still change the
/// permission status in the settings.
/// *Only supported on Android.*
permanentlyDenied,
///User has authorized this application for limited access.
/// *Only supported on iOS (iOS14+).*
limited,
}
extension PermissionStatusValue on PermissionStatus {
......@@ -40,9 +40,9 @@ extension PermissionStatusValue on PermissionStatus {
case PermissionStatus.undetermined:
return 3;
case PermissionStatus.permanentlyDenied:
return 4;
case PermissionStatus.limited:
return 5;
case PermissionStatus.limited:
return 4;
default:
throw UnimplementedError();
}
......@@ -54,8 +54,8 @@ extension PermissionStatusValue on PermissionStatus {
PermissionStatus.granted,
PermissionStatus.restricted,
PermissionStatus.undetermined,
PermissionStatus.permanentlyDenied,
PermissionStatus.limited,
PermissionStatus.permanentlyDenied,
][value];
}
}
......
......@@ -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: 2.0.1
version: 2.0.2
dependencies:
flutter:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment