imageQualityFromJson function
Implementation
enums.ImageQuality imageQualityFromJson(
Object? imageQuality, [
enums.ImageQuality? defaultValue,
]) {
if (imageQuality is String) {
return enums.$ImageQualityMap.entries
.firstWhere(
(element) =>
element.value.toLowerCase() == imageQuality.toLowerCase(),
orElse: () =>
const MapEntry(enums.ImageQuality.swaggerGeneratedUnknown, ''))
.key;
}
final parsedResult = defaultValue == null
? null
: enums.$ImageQualityMap.entries
.firstWhereOrNull((element) => element.value == defaultValue)
?.key;
return parsedResult ??
defaultValue ??
enums.ImageQuality.swaggerGeneratedUnknown;
}