readChapters static method
Implementation
static Future<List<EpubChapter>> readChapters(
List<EpubChapterRef> chapterRefs) async {
final result = <EpubChapter>[];
await Future.forEach(chapterRefs, (EpubChapterRef chapterRef) async {
final chapter = EpubChapter(
chapterRef.title,
chapterRef.contentFileName,
chapterRef.anchor,
await chapterRef.readHtmlContent(),
await readChapters(chapterRef.subChapters),
);
result.add(chapter);
});
return result;
}