toEnum<T> function Null safety

T toEnum<T>(
  1. List values,
  2. String key,
  3. Map<String, dynamic> map
)

Implementation

T toEnum<T>(List values, String key, Map<String, dynamic> map) {
  return values.firstWhere((element) => describeEnum(element) == map[key]);
}