Commit 2f8be41a by Rustem Kakimov Committed by GitHub

Explain isPermanentlyDenied

Some users (me included) were puzzled when `isPermanentlyDenied` returned `false` even when permission was permanently denied.
parent 089b6bd2
...@@ -21,6 +21,7 @@ enum PermissionStatus { ...@@ -21,6 +21,7 @@ enum PermissionStatus {
/// Permission to the requested feature is permanently denied, the permission /// Permission to the requested feature is permanently denied, the permission
/// dialog will not be shown when requesting this permission. The user may /// dialog will not be shown when requesting this permission. The user may
/// still change the permission status in the settings. /// still change the permission status in the settings.
/// *Only supported on Android.*
permanentlyDenied, permanentlyDenied,
} }
...@@ -70,6 +71,9 @@ extension PermissionStatusGetters on PermissionStatus { ...@@ -70,6 +71,9 @@ extension PermissionStatusGetters on PermissionStatus {
/// 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.*
///
/// WARNING: This can only be determined AFTER requesting this permission.
/// Therefore make a `request` call first.
bool get isPermanentlyDenied => this == PermissionStatus.permanentlyDenied; bool get isPermanentlyDenied => this == PermissionStatus.permanentlyDenied;
bool get isLimited => this == PermissionStatus.limited; bool get isLimited => this == PermissionStatus.limited;
......
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