status property
Future<PermissionStatus>
get
status
Implementation
Future<PermissionStatus> get status async {
if (permission == Permission.notification) {
var status = await notification.NotificationPermissions
.getNotificationPermissionStatus();
switch (status) {
case notification.PermissionStatus.granted:
return PermissionStatus.granted;
case notification.PermissionStatus.denied:
return PermissionStatus.denied;
case notification.PermissionStatus.provisional:
return PermissionStatus.limited;
case notification.PermissionStatus.unknown:
default:
return PermissionStatus.denied;
}
}
return await permission.status;
}