PlacesServiceStatus$cast function Null safety

PlacesServiceStatus? PlacesServiceStatus$cast(
  1. dynamic value
)

Implementation

PlacesServiceStatus? PlacesServiceStatus$cast(value) {
  if (value == PlacesServiceStatus.INVALID_REQUEST)
    return PlacesServiceStatus.INVALID_REQUEST;
  if (value == PlacesServiceStatus.NOT_FOUND)
    return PlacesServiceStatus.NOT_FOUND;
  if (value == PlacesServiceStatus.OK) return PlacesServiceStatus.OK;
  if (value == PlacesServiceStatus.OVER_QUERY_LIMIT)
    return PlacesServiceStatus.OVER_QUERY_LIMIT;
  if (value == PlacesServiceStatus.REQUEST_DENIED)
    return PlacesServiceStatus.REQUEST_DENIED;
  if (value == PlacesServiceStatus.UNKNOWN_ERROR)
    return PlacesServiceStatus.UNKNOWN_ERROR;
  if (value == PlacesServiceStatus.ZERO_RESULTS)
    return PlacesServiceStatus.ZERO_RESULTS;
  return null;
}