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