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