toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'topic'] = this.topic;
json[r'sub_topic'] = this.subTopic;
json[r'skills_assessed'] = this.skillsAssessed;
json[r'content'] = this.content;
json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
json[r'updated_at'] = this.updatedAt.toUtc().toIso8601String();
if (this.difficulty != null) {
json[r'difficulty'] = this.difficulty;
} else {
json[r'difficulty'] = null;
}
if (this.cognitiveSkills != null) {
json[r'cognitive_skills'] = this.cognitiveSkills;
} else {
json[r'cognitive_skills'] = null;
}
if (this.grade != null) {
json[r'grade'] = this.grade;
} else {
json[r'grade'] = null;
}
if (this.expectedTimeToSolve != null) {
json[r'expected_time_to_solve'] = this.expectedTimeToSolve;
} else {
json[r'expected_time_to_solve'] = null;
}
if (this.relatedConcepts != null) {
json[r'related_concepts'] = this.relatedConcepts;
} else {
json[r'related_concepts'] = null;
}
if (this.hintsProvided != null) {
json[r'hints_provided'] = this.hintsProvided;
} else {
json[r'hints_provided'] = null;
}
if (this.learningOutcomes != null) {
json[r'learning_outcomes'] = this.learningOutcomes;
} else {
json[r'learning_outcomes'] = null;
}
if (this.prerequisites != null) {
json[r'prerequisites'] = this.prerequisites;
} else {
json[r'prerequisites'] = null;
}
if (this.recommendedGradeLevel != null) {
json[r'recommended_grade_level'] = this.recommendedGradeLevel;
} else {
json[r'recommended_grade_level'] = null;
}
if (this.expectedAnswer != null) {
json[r'expected_answer'] = this.expectedAnswer;
} else {
json[r'expected_answer'] = null;
}
if (this.image != null) {
json[r'image'] = this.image;
} else {
json[r'image'] = null;
}
if (this.answerImage != null) {
json[r'answer_image'] = this.answerImage;
} else {
json[r'answer_image'] = null;
}
if (this.platform != null) {
json[r'platform'] = this.platform;
} else {
json[r'platform'] = null;
}
return json;
}