shouldShowRequestPermissionRationale method
Future<bool>
shouldShowRequestPermissionRationale({
- LocationPermissionLevel permissionLevel = LocationPermissionLevel.location,
Request to see if you should show a rationale for requesting permission.
This method is only implemented on Android, calling this on iOS always
returns false
.
Implementation
Future<bool> shouldShowRequestPermissionRationale(
{LocationPermissionLevel permissionLevel =
LocationPermissionLevel.location}) async {
if (!Platform.isAndroid) {
return false;
}
final bool? shouldShowRationale = await _methodChannel.invokeMethod(
'shouldShowRequestPermissionRationale', permissionLevel.index);
return shouldShowRationale ?? false;
}