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