toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['feature'] = feature ?? "";
  data['title'] = title;
  data['author'] = author;
  data['excerpt'] = excerpt;
  data['icon_url'] = iconUrl ?? "";
  data['icon_dark_url'] = iconDarkUrl ?? "";
  data['category'] = category;
  data['description'] = description;
  data['body'] = body ?? "";
  data['order'] = order;
  data['hide_table_of_contents'] = hideTableContent;
  if (date != null) {
    data['date'] = date!.toIso8601String();
  }
  return data;
}