StoryQuizComponent.fromJson constructor

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

Implementation

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