Dart编程实例 - Dart Switch Case 语句
void main() {
var grade = "A";
switch(grade) {
case "A": { print("Excellent"); }
break;
case "B": { print("Good"); }
break;
case "C": { print("Fair"); }
break;
case "D": { print("Poor"); }
break;
default: { print("Invalid choice"); }
break;
}
}