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