platform property

PermissionPlatform get platform

Implementation

PermissionPlatform get platform {
  PermissionPlatform ret = PermissionPlatform.none;
  switch (permission.value) {
    case 0: //calendar
    case 1: //camera
    case 2: //contacts
    case 3: //location
    case 4: //locationAlways
    case 5: //locationWhenInUse
    case 7: //microphone
    case 12: //sensors
    case 13: //sms
    case 14: //speech
    case 15: //storage
    case 16: //ignoreBatteryOptimizations

      ret = PermissionPlatform.both;
      break;

    case 6: //mediaLibrary
    case 9: //photos
    case 10: //photosAddOnly
    case 11: //reminders
    case 17: //notification
    case 21: //bluetooth
    case 25: // appTrackingTransparency
    case 26: // criticalAlerts
      ret = PermissionPlatform.ios;
      break;

    case 8: //phone
    case 18: //accessMediaLocation
    case 19: //activityRecognition
    case 22: // manageExternalStorage
    case 23: // systemAlertWindow
    case 24: // requestInstallPackages
    case 27: // accessNotificationPolicy
      ret = PermissionPlatform.android;
      break;

    case 20: //unknown
    default:
      break;
  }

  return ret;
}