fereader 0.2.0 copy "fereader: ^0.2.0" to clipboard
fereader: ^0.2.0 copied to clipboard

A Flutter epub reader for iOS and Android which wraps the folioreader framework.

Fereader pub package #

Inspired by epub_viewer I made this to fit my needs.

Install #

This plugin requires Swift to work on iOS. Also, the minimum deployment target is 9.0

platform :ios, '9.0'

Import into pubspec.yaml

dependencies:
  fereader: 0.0.1

Note: Please add this to the release build type in your app build.gradle to avoid crashes on android release builds

minifyEnabled false
shrinkResources false

Usage #

Fereader.setConfig(
  themeColor: Theme.of(context).primaryColor,
  identifier: "iosBook",
  scrollDirection: EpubScrollDirection.VERTICAL,
  allowSharing: true,
  enableTts: true,
)

/**
* @bookPath
* @lastLocation (optional and only android)
*/
Fereader.open(
  '/path/to/ebook.epub',
  lastLocation: EpubLocator.fromJson({
    "bookId": "2239",
    "href": "/OEBPS/ch06.xhtml",
    "created": 1539934158390,
    "locations": {
       "cfi": "epubcfi(/0!/4/4[simple_book]/2/2/6)"
    }
  }), // first page will open up if the value is null
);

// Get locator which you can save in your database
EpubViewer.locatorStream.listen((locator) {
   print('LOCATOR: ${EpubLocator.fromJson(jsonDecode(locator))}');
   // convert locator from string to json and save to your database to be retrieved later
});
4
likes
40
pub points
11%
popularity

Publisher

verified publishermca.io

A Flutter epub reader for iOS and Android which wraps the folioreader framework.

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

flutter, path, path_provider

More

Packages that depend on fereader