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