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