toJson method
Converts this model stats to a JSON map.
Implementation
Map<String, dynamic> toJson() {
return {
'downloadCount': downloadCount,
'favoriteCount': favoriteCount,
'commentCount': commentCount,
if (rating != null) 'rating': rating,
if (ratingCount != null) 'ratingCount': ratingCount,
if (tippedAmountCount != null) 'tippedAmountCount': tippedAmountCount,
};
}