fromPermissionStatus function

GeolocationStatus fromPermissionStatus(
  1. PermissionStatus status
)

Translates the PermissionStatus object to a GeolocationStatus object.

Implementation

GeolocationStatus fromPermissionStatus(PermissionStatus status) {
  switch (status) {
    case PermissionStatus.denied:
      return GeolocationStatus.denied;
    case PermissionStatus.granted:
      return GeolocationStatus.granted;
    case PermissionStatus.restricted:
      return GeolocationStatus.restricted;
    default:
      return GeolocationStatus.unknown;
  }
}