toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['carousel'] = carousel;
if (images != null) {
data['images'] = images!.map((imgData) => imgData.toJson()).toList();
}
data['img1'] = img1;
data['img2'] = img2;
data['img3'] = img3;
data['img4'] = img4;
data['img5'] = img5;
return data;
}