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