toMap method
Implementation
Map<String, dynamic> toMap() {
return {
if (name != null) 'name': this.name,
if (description != null) 'description': this.description,
if (author != null) 'author': this.author,
if (recentVersion != null) 'recentVersion': this.recentVersion,
'likes': this.likes,
}.map((key, value) =>
MapEntry(key, value is String ? sanitizeJson(value) : value));
}