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