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