convertFromString<T> static method
Implementation
static T? convertFromString<T>(List<T> enumValues, String value) {
try {
return enumValues.singleWhere((enumItem) =>
convertToString(enumItem).toLowerCase() == value.toLowerCase());
} on StateError catch (_) {
return null;
}
}