csBooks-updates icon indicating copy to clipboard operation
csBooks-updates copied to clipboard

MobileApp: Add Comic reader support

Open caesiumstudio opened this issue 9 months ago • 0 comments

https://pub.dev/packages/comic_reader

  • Add the package
  • Once the book is there clicking the comic book should open the book in comic reader widget.
  • Test with a sample comic book file for now
  1. Login to the csBooks app with the following account -

email/username - [email protected]

password - 1234

  1. You will see a CBR file called "Dogs of London", this is a comic book you can work with to implement the Comic book reader. (Don't delete this file)

  2. In the comic_viewer_page.dart file you have a function called - _extractPagesFromBook. Inside this function you need to write the following logic.

If a file with the name <fingerprint.cbr> is found in the application directory of csBooks app, then extract pages from this file. Otherwise download the file from the link - book.filePath and save it with the name .cbr in the application directory.

  1. In the folder cs_toolkit/platform you have several functions to deal with app's application directory. Use whichever function you need to from them. For downloading you need to implement an API call in the book_download_api.dart file (I created it today) and use it with AppStateProvider.

  2. Feel free to modify BookDownloadApi in any way you need. Just make sure you use it with AppStateProvider.

caesiumstudio avatar Apr 03 '25 10:04 caesiumstudio