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