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