Commit fb752f41 by Maurits van Beusekom Committed by GitHub

Merge pull request #460 from Baseflow/remove_undetermined

Removed PermissionStatus.undetermined
parents f557526b 4d6addbe
## 3.0.0+1
* **BREAKING**: Removed PermissionStatus.undetermined. This is now replaced by PermissionStatus.denied.
## 3.0.0
* Migrated to null safety.
......
......@@ -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.undetermined:
case PermissionStatus.denied:
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;
......
......@@ -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:
......
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