skyState method Null safety
Implementation
static String skyState(String sky, String pty) {
final int ptyInt = int.parse(pty);
final int skyInt = int.parse(sky);
switch (ptyInt) {
case 1:
return "비";
case 2:
return "눈/비";
case 3:
return "눈";
case 4:
return "소나기";
default:
switch (skyInt) {
case 6:
case 7:
case 8:
return "구름많음";
case 9:
case 10:
return "흐림";
default:
return "맑음";
}
}
}