FormattedExperimentApiResponse.fromJson constructor
FormattedExperimentApiResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory FormattedExperimentApiResponse.fromJson(Map<String, dynamic> json) {
final experimentDataMap = (json['experimentData'] as Map<String, dynamic>).map(
(key, value) => MapEntry(key, UserExperimentVariant.fromJson(value)),
);
return FormattedExperimentApiResponse(
experimentData: experimentDataMap,
experimentUserType: json['experimentUserType'],
timestamp: json['timestamp'],
);
}