hasPermission property

bool get hasPermission

Implementation

bool get hasPermission {
  try {
    final perm = Notification.permission;
    return (perm == "granted");
  } catch (e) {
    printDebug("Failed to query notifications permission", tag: tag);
    printDebug(e);
    return false;
  }
}