toJson method
Converts this model to a serializable JSON map.
Implementation
Map<String, dynamic> toJson() {
return {
if (id != null) 'id': id,
'title': title,
'description': description,
if (imageUrl != null) 'imageUrl': imageUrl,
if (link != null) 'link': link,
'callToAction': callToAction,
'advertiser': advertiser,
if (rating != null) 'rating': rating,
if (extras != null) 'extras': extras,
};
}