labelFor method
- T choice
Returns the user-facing label for choice.
Implementation
String labelFor(T choice) {
final label = choiceLabels[choice];
if (label != null) {
return label;
}
if (choice is Type) {
throw RohdHclException(
'Type choices require stable labels for minified builds.');
}
return choice is Enum ? choice.name : choice.toString();
}