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