PollOptionModel.fromJson constructor

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

Implementation

factory PollOptionModel.fromJson(Map<String, dynamic> json) {
  PollQuestionModel pollQuestion =
      PollQuestionModel.fromJson(json["pollQuestion"]);
  return new PollOptionModel(
    id: json['id'],
    pollQuestion: pollQuestion,
    option: json['option'],
  );
}