toJson method
Implementation
Map<String, Object?> toJson() {
var number = this.number;
var authorId = this.authorId;
var message = this.message;
var createdAt = this.createdAt;
var minorEdit = this.minorEdit;
var contentTypeModified = this.contentTypeModified;
var collaborators = this.collaborators;
var prevVersion = this.prevVersion;
var nextVersion = this.nextVersion;
final json = <String, Object?>{};
if (number != null) {
json[r'number'] = number;
}
if (authorId != null) {
json[r'authorId'] = authorId;
}
if (message != null) {
json[r'message'] = message;
}
if (createdAt != null) {
json[r'createdAt'] = createdAt.toIso8601String();
}
json[r'minorEdit'] = minorEdit;
json[r'contentTypeModified'] = contentTypeModified;
json[r'collaborators'] = collaborators;
if (prevVersion != null) {
json[r'prevVersion'] = prevVersion;
}
if (nextVersion != null) {
json[r'nextVersion'] = nextVersion;
}
return json;
}