VerticalFeedItemQuizComponent.fromJson constructor

VerticalFeedItemQuizComponent.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory VerticalFeedItemQuizComponent.fromJson(Map<String, dynamic> json) {
  return VerticalFeedItemQuizComponent(
    type: json['type'],
    id: json['id'],
    customPayload: json['customPayload'],
    rightAnswerIndex: json['rightAnswerIndex'],
    title: json['title'],
    options: List<String>.from(json['options'].map((x) => x)),
    selectedOptionIndex: json['selectedOptionIndex'],
  );
}