toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> jsonMap = {
"id": id,
"title": title,
"text": text,
"imageResource": imageResource,
"activatedAt": activatedAt?.toIso8601String(),
"stores": stores?.map((element) => element.toJson()).toList(),
};
return jsonMap;
}