toJson method
Implementation
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> map = {};
if (thumbnail != null) {
map['thumbnail'] = thumbnail!.toJson();
}
if (hero != null) {
map['hero'] = hero!.toJson();
}
if (backgroundColor != null) {
map['background'] = {'color': backgroundColor};
}
if (textColor != null) {
map['text'] = {'color': textColor};
}
return map;
}