Hi,
I have the following codes as below. This code works perfectly fine for location. So I go to my settings and I close the permission for location and it keep asking for permission. I just replace it with await Permission.notification.status and replace everything with notification it does not work the same after its denied. Why its behaving differently for notification permission?
var status = await Permission.location.status;
print("location STATUS is" + status.toString());
if (status.isRestricted) {
// We didn't ask for permission yet.
print("RESTRICTED IN THE IF NOW");
Map<Permission, PermissionStatus> statuses = await [
Permission.location,
].request();
print("ÄFTER GET " + statuses[Permission.location].toString());
}
if (status.isUndetermined) {
// We didn't ask for permission yet.
print("UN DETERMINED IN THE IF NOW");
Map<Permission, PermissionStatus> statuses = await [
Permission.location,
].request();
print("ÄFTER GET " + statuses[Permission.location].toString());
}
if (status.isDenied) {
// We didn't ask for permission yet.
print("DENIED IN THE IF NOW");
Map<Permission, PermissionStatus> statuses = await [
Permission.location,
].request();
print("ÄFTER GET " + statuses[Permission.location].toString());
}
Hi,
I have the following codes as below. This code works perfectly fine for location. So I go to my settings and I close the permission for location and it keep asking for permission. I just replace it with await Permission.notification.status and replace everything with notification it does not work the same after its denied. Why its behaving differently for notification permission?