Question.fromJson constructor

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

Implementation

factory Question.fromJson(Map<String, dynamic> json) => Question(
      questionIdentifier: json['question_identifier'] as String,
      questionText: json['question_text'] as String,
      questionType: json['question_type'] as String,
      userAnswer: json['user_answer'] != null
          ? UserAnswer.fromJson((json['user_answer'] as Map).cast<String, dynamic>())
          : null,
    );