Closed
Description
It'd be great to offer to convert this to a Dart 3.0 switch expression.
For example:
String f(Color color) {
String result;
switch (color) {
case Color.blue:
result = 'blue';
break;
case Color.red:
throw 'Unsupported';
}
return result;
}
could be converted to:
String f(Color color) {
String result;
result = switch (color) {
case Color.blue => 'blue',
case Color.red => throw 'Unsupported'
}
return result;
}