toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
if (this.provider != null) {
json[r'provider'] = this.provider;
} else {
json[r'provider'] = null;
}
if (this.accountId != null) {
json[r'accountId'] = this.accountId;
} else {
json[r'accountId'] = null;
}
if (this.ownerUserId != null) {
json[r'ownerUserId'] = this.ownerUserId;
} else {
json[r'ownerUserId'] = null;
}
json[r'title'] = this.title;
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.theme != null) {
json[r'theme'] = this.theme;
} else {
json[r'theme'] = null;
}
if (this.thumbnailUrl != null) {
json[r'thumbnailUrl'] = this.thumbnailUrl;
} else {
json[r'thumbnailUrl'] = null;
}
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
if (this.lastViewedAt != null) {
json[r'lastViewedAt'] = this.lastViewedAt!.toUtc().toIso8601String();
} else {
json[r'lastViewedAt'] = null;
}
return json;
}