Results.fromJson constructor Null safety

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

Implementation

Results.fromJson(Map<String, dynamic> json) {
    category = json['category'];
    type = json['type'];
    difficulty = json['difficulty'];
    question = json['question'];
    correctAnswer = json['correct_answer'];
    incorrectAnswers = json['incorrect_answers'].cast<String>();
}