DirectionsStatus$cast function

DirectionsStatus? DirectionsStatus$cast(
  1. dynamic value
)

Implementation

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