weatherIcon property

String get weatherIcon

Get weather icon based on weather code.

Implementation

String get weatherIcon {
  return switch (weatherCode) {
    0 || 1 => '☀️',
    2 => '⛅',
    3 => '☁️',
    45 || 48 => '🌫️',
    >= 51 && <= 57 => '🌧️',
    >= 61 && <= 67 => '🌧️',
    >= 71 && <= 77 => '❄️',
    >= 80 && <= 82 => '🌦️',
    >= 85 && <= 86 => '🌨️',
    >= 95 && <= 99 => '⛈️',
    _ => '🌡️',
  };
}