factory<T extends Enumerable> static method
Implementation
static T factory<T extends Enumerable>(List<T> values, rawValue) {
assert(values.length > 0, "The 'values' is empty");
// other cases: String, bool
return values.firstWhere((o) => o.rawValue == rawValue,);
}