toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'math_student'] = this.mathStudent;
json[r'question'] = this.question;
json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
json[r'updated_at'] = this.updatedAt.toUtc().toIso8601String();
if (this.answer != null) {
json[r'answer'] = this.answer;
} else {
json[r'answer'] = null;
}
if (this.image != null) {
json[r'image'] = this.image;
} else {
json[r'image'] = null;
}
if (this.isCorrect != null) {
json[r'is_correct'] = this.isCorrect;
} else {
json[r'is_correct'] = null;
}
if (this.score != null) {
json[r'score'] = this.score;
} else {
json[r'score'] = null;
}
if (this.feedback != null) {
json[r'feedback'] = this.feedback;
} else {
json[r'feedback'] = null;
}
return json;
}