enumDecode<K, V> function
Null safety
Implementation
K? enumDecode<K, V>(
Map<K, V> enumValues,
Object? source, {
K? unknownValue,
}) {
if (source != null) {}
final entries = enumValues.entries.where((element) {
return element.value == source;
}).toList();
return entries.length > 0 ? entries.first.key : unknownValue;
}