parseChapters function
Implementation
List<EpubChapter> parseChapters(EpubBook epubBook) =>
epubBook.Chapters!.fold<List<EpubChapter>>(
[],
(acc, next) {
acc.add(next);
next.SubChapters!.forEach(acc.add);
return acc;
},
);