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