KmlLayerStatus$cast function

KmlLayerStatus? KmlLayerStatus$cast(
  1. dynamic value
)

Implementation

KmlLayerStatus? KmlLayerStatus$cast(value) {
  if (value == KmlLayerStatus.DOCUMENT_NOT_FOUND)
    return KmlLayerStatus.DOCUMENT_NOT_FOUND;
  if (value == KmlLayerStatus.DOCUMENT_TOO_LARGE)
    return KmlLayerStatus.DOCUMENT_TOO_LARGE;
  if (value == KmlLayerStatus.FETCH_ERROR) return KmlLayerStatus.FETCH_ERROR;
  if (value == KmlLayerStatus.INVALID_DOCUMENT)
    return KmlLayerStatus.INVALID_DOCUMENT;
  if (value == KmlLayerStatus.INVALID_REQUEST)
    return KmlLayerStatus.INVALID_REQUEST;
  if (value == KmlLayerStatus.LIMITS_EXCEEDED)
    return KmlLayerStatus.LIMITS_EXCEEDED;
  if (value == KmlLayerStatus.OK) return KmlLayerStatus.OK;
  if (value == KmlLayerStatus.TIMED_OUT) return KmlLayerStatus.TIMED_OUT;
  if (value == KmlLayerStatus.UNKNOWN) return KmlLayerStatus.UNKNOWN;
  return null;
}