toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'town_hall': townHall,
'layout_type': layoutType,
'sub_types': subTypes != null ? jsonEncode(subTypes) : null,
'title': title,
'image': image,
'detail_url': detailUrl,
'base_link': baseLink,
'views': views,
'source': source,
'base_type': baseType,
'created_at': createdAt?.toIso8601String(),
'updated_at': updatedAt?.toIso8601String(),
};
}