mapEnumExcludeUnset<T extends Enum> static method
- List<
T> values
strips all enums "unset"
Implementation
static Map<String, T> mapEnumExcludeUnset<T extends Enum>(
List<T> values) {
// mainly used for ui based form building
Map<String, T> map = <String, T>{};
for (T e in values) {
map[e.name.formalize] = e;
}
return map;
}