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