EPub Reader Highlight is a Flutter application that offers a complete solution for reading books in the Epub format. With an intuitive interface and advanced features, this tool allows developers to create personalized and efficient reading experiences for their users.
Here are some screenshots of EPub Reader Highlight in action:
git clone https://github.com/danielmaques/epub_reader_highlight.git
cd epub_reader_highlight
flutter pub get
flutter run
class _MainAppState extends State<MainApp> {
late EpubController _epubReaderController;
@override
void initState() {
super.initState();
/// Assets
/// EpubDocument.openAsset('assets/gentle-green-obooko.epub')
/// EpubDocument.openFile(path)
_epubReaderController = EpubController(
document: EpubDocument.openAsset('assets/gentle-green-obooko.epub'),
);
_epubReaderController = EpubController(
document: EpubDocument.,
);
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Container(
color: Colors.white,
child: SafeArea(
bottom: false,
child: Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
title: EpubViewActualChapter(
controller: _epubReaderController,
builder: (chapterValue) => Text(
'Chapter: ${chapterValue?.chapter?.Title?.replaceAll('\n', '').trim() ?? ''}',
textAlign: TextAlign.start,
),
),
),
drawer: Drawer(
child: EpubViewTableOfContents(
controller: _epubReaderController,
),
),
body: EpubView(
builders: EpubViewBuilders<DefaultBuilderOptions>(
options: const DefaultBuilderOptions(
textStyle: TextStyle(),
),
chapterDividerBuilder: (_) => Container(),
),
controller: _epubReaderController,
),
),
),
),
);
}
}
EpubViewTableOfContents(
controller: _epubReaderController,
),
Last Paragraph Access:
onHighlightTap: (selectedTextModel) {
print('Highlighted Text: $selectedTextModel');
},
paragraphIndexOnDispose: (paragraphIndex) {
print('Last paragraph Index: $paragraphIndex');
},
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion to improve this project, please fork the repository and create a pull request. You can also simply open an issue with the appropriate tag. Don't forget to give the project a star! Thank you very much!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Be sure to include a tag and follow Conventional Commits and Semantic Versioning when submitting your commit and/or creating the issue.
Thanks to all the people who have contributed to this project. Without you, this project would not be possible.
Daniel Marques |
Gabriel Barreto Matos Maia |
---|
This project is licensed under the MIT License.