loadDocumentFromPath method

Future<void> loadDocumentFromPath(
  1. String filePath
)

Implementation

Future<void> loadDocumentFromPath(String filePath) async {
  try {
    var file = File(filePath);
    var epubBook = await EpubReader.readBook(file.readAsBytesSync());
    loadDocument(Future.value(epubBook));
  } catch (e) {
    debugPrint("Failed to load document: $e");
  }
}