toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  final data = <String, dynamic>{};
  data['id'] = id;
  data['page_number'] = pageNumber;
  data['narration_id'] = narrationId;
  data['chapter_id'] = chapterId;
  data['book_id'] = bookId;
  data['part_id'] = partId;
  data['sub_part_id'] = subPartId;
  data['image'] = image;
  if (verses != null) {
    data['verses'] = verses!.map((v) => v.toJson()).toList();
  }
  if (glyphs != null) {
    data['glyphs'] = glyphs!.map((v) => v.toJson()).toList();
  }
  return data;
}