toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.id != null) {
json[r'id'] = this.id;
} else {
json[r'id'] = null;
}
if (this.mathStudent != null) {
json[r'math_student'] = this.mathStudent;
} else {
json[r'math_student'] = null;
}
if (this.question != null) {
json[r'question'] = this.question;
} else {
json[r'question'] = null;
}
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;
}
if (this.createdAt != null) {
json[r'created_at'] = this.createdAt!.toUtc().toIso8601String();
} else {
json[r'created_at'] = null;
}
if (this.updatedAt != null) {
json[r'updated_at'] = this.updatedAt!.toUtc().toIso8601String();
} else {
json[r'updated_at'] = null;
}
return json;
}