We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d86245 commit ffab216Copy full SHA for ffab216
lib/services/weather.dart
@@ -0,0 +1,33 @@
1
+class WeatherModel {
2
+ String getWeatherIcon(int condition) {
3
+ if (condition < 300) {
4
+ return '🌩';
5
+ } else if (condition < 400) {
6
+ return '🌧';
7
+ } else if (condition < 600) {
8
+ return '☔️';
9
+ } else if (condition < 700) {
10
+ return '☃️';
11
+ } else if (condition < 800) {
12
+ return '🌫';
13
+ } else if (condition == 800) {
14
+ return '☀️';
15
+ } else if (condition <= 804) {
16
+ return '☁️';
17
+ } else {
18
+ return '🤷';
19
+ }
20
21
+
22
+ String getMessage(int temp) {
23
+ if (temp > 25) {
24
+ return 'It\'s 🍦 time';
25
+ } else if (temp > 20) {
26
+ return 'Time for shorts and 👕';
27
+ } else if (temp < 10) {
28
+ return 'You\'ll need 🧣 and 🧤';
29
30
+ return 'Bring a 🧥 just in case';
31
32
33
+}
0 commit comments