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