Commit aa4819a4 by daniel.roek

Removed PermissionStatus.undetermined

parent f557526b
## 3.0.0 ## 3.0.0
* Migrated to null safety. * Migrated to null safety.
* Removed PermissionStatus.undetermined. This is now replaced by PermissionStatus.denied.
## 2.0.2 ## 2.0.2
......
...@@ -2,9 +2,6 @@ part of permission_handler_platform_interface; ...@@ -2,9 +2,6 @@ part of permission_handler_platform_interface;
/// Defines the state of a [Permission]. /// Defines the state of a [Permission].
enum PermissionStatus { enum PermissionStatus {
/// The permission wasn't requested yet.
undetermined,
/// The user granted access to the requested feature. /// The user granted access to the requested feature.
granted, granted,
...@@ -37,7 +34,7 @@ extension PermissionStatusValue on PermissionStatus { ...@@ -37,7 +34,7 @@ extension PermissionStatusValue on PermissionStatus {
return 1; return 1;
case PermissionStatus.restricted: case PermissionStatus.restricted:
return 2; return 2;
case PermissionStatus.undetermined: case PermissionStatus.denied:
return 3; return 3;
case PermissionStatus.permanentlyDenied: case PermissionStatus.permanentlyDenied:
return 5; return 5;
...@@ -53,7 +50,6 @@ extension PermissionStatusValue on PermissionStatus { ...@@ -53,7 +50,6 @@ extension PermissionStatusValue on PermissionStatus {
PermissionStatus.denied, PermissionStatus.denied,
PermissionStatus.granted, PermissionStatus.granted,
PermissionStatus.restricted, PermissionStatus.restricted,
PermissionStatus.undetermined,
PermissionStatus.limited, PermissionStatus.limited,
PermissionStatus.permanentlyDenied, PermissionStatus.permanentlyDenied,
][value]; ][value];
...@@ -61,9 +57,6 @@ extension PermissionStatusValue on PermissionStatus { ...@@ -61,9 +57,6 @@ extension PermissionStatusValue on PermissionStatus {
} }
extension PermissionStatusGetters 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. /// If the user granted access to the requested feature.
bool get isGranted => this == PermissionStatus.granted; bool get isGranted => this == PermissionStatus.granted;
...@@ -86,9 +79,6 @@ extension PermissionStatusGetters on PermissionStatus { ...@@ -86,9 +79,6 @@ extension PermissionStatusGetters on PermissionStatus {
} }
extension FuturePermissionStatusGetters on Future<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. /// If the user granted access to the requested feature.
Future<bool> get isGranted async => (await this).isGranted; Future<bool> get isGranted async => (await this).isGranted;
......
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