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