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