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