@@ -2,9 +2,6 @@ part of permission_handler_platform_interface;
2
2
3
3
/// Defines the state of a [Permission] .
4
4
enum PermissionStatus {
5
- /// The permission wasn't requested yet.
6
- undetermined,
7
-
8
5
/// The user granted access to the requested feature.
9
6
granted,
10
7
@@ -37,7 +34,7 @@ extension PermissionStatusValue on PermissionStatus {
37
34
return 1 ;
38
35
case PermissionStatus .restricted:
39
36
return 2 ;
40
- case PermissionStatus .undetermined :
37
+ case PermissionStatus .denied :
41
38
return 3 ;
42
39
case PermissionStatus .permanentlyDenied:
43
40
return 5 ;
@@ -53,17 +50,13 @@ extension PermissionStatusValue on PermissionStatus {
53
50
PermissionStatus .denied,
54
51
PermissionStatus .granted,
55
52
PermissionStatus .restricted,
56
- PermissionStatus .undetermined,
57
53
PermissionStatus .limited,
58
54
PermissionStatus .permanentlyDenied,
59
55
][value];
60
56
}
61
57
}
62
58
63
59
extension PermissionStatusGetters on PermissionStatus {
64
- /// If the permission was never requested before.
65
- bool get isUndetermined => this == PermissionStatus .undetermined;
66
-
67
60
/// If the user granted access to the requested feature.
68
61
bool get isGranted => this == PermissionStatus .granted;
69
62
@@ -86,9 +79,6 @@ extension PermissionStatusGetters on PermissionStatus {
86
79
}
87
80
88
81
extension FuturePermissionStatusGetters on Future <PermissionStatus > {
89
- /// If the permission was never requested before.
90
- Future <bool > get isUndetermined async => (await this ).isUndetermined;
91
-
92
82
/// If the user granted access to the requested feature.
93
83
Future <bool > get isGranted async => (await this ).isGranted;
94
84
0 commit comments