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