fromValue static method

CongestionLevel fromValue(
  1. int value
)

Implementation

static CongestionLevel fromValue(int value) {
  switch (value) {
    case 0:
      return CongestionLevel.unknown;
    case 1:
      return CongestionLevel.low;
    case 2:
      return CongestionLevel.moderate;
    case 3:
      return CongestionLevel.heavy;
    case 4:
      return CongestionLevel.severe;
    default:
      return CongestionLevel.unknown;
  }
}