isRainy static method

bool isRainy(
  1. WeatherType weatherType
)

判断是否下雨,小中大包括雷暴,都是属于雨的类型

Implementation

static bool isRainy(WeatherType weatherType) {
  return weatherType == WeatherType.lightRainy ||
      weatherType == WeatherType.middleRainy ||
      weatherType == WeatherType.heavyRainy ||
      weatherType == WeatherType.thunder;
}