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