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