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