Flutter Novel Reader is a multi-platform reading app offering smooth scrolling, diverse text styles, and personalized settings. It supports chapter evaluation and interaction features, easy installation and usage, real-time reading progress monitoring, and is released under the LGPLv3 license.
- Supports reading local novels
- Implements smooth scrolling with coverage
- Provides diverse text style settings, including color, size, and font
- Allows free adjustment of line spacing and letter spacing for personalized reading experience
- Enables setting introduction pages and chapter end pages, including features like chapter ratings and interactive pages
Android | iOS | MacOS | Windows | Linux | Web |
---|---|---|---|---|---|
✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-
Add this package to your Flutter project's
pubspec.yaml
file according to the installation instructionsdependencies: flutter_read: "^1.0.2"
-
Import the necessary libraries
import 'package:flutter_read/flutter_read.dart';
-
Declare a novel controller variable:
final ReadController readController = ReadController.create();
-
Add the novel widget to the interface:
@override Widget build(BuildContext context) { return MaterialApp( home: ReadView(readController: readController), ); }
-
Open the novel:
final ByteData byteData = await rootBundle.load("assets/斗罗大陆.txt"); BookSource source = ByteDataSource(byteData, "《斗罗大陆》", isSplit: true); int state = await readController.startReadBook(source);
-
Listen to the novel reading progress:
StreamSubscription subscription = readController.onPageIndexChanged.listen((progress) { // Handle logic for page index changes }); // Unsubscribe when the page exits @override void dispose() { subscription.cancel(); super.dispose(); }
This project is released under the LGPLv3 license.