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