flutter_read 1.0.1 copy "flutter_read: ^1.0.1" to clipboard
flutter_read: ^1.0.1 copied to clipboard

Flutter小说阅读器

Language: English | 中文简体

flutter_read #

Flutter Reader is a cross-platform reading application that provides users with a high-quality local novel reading experience.

Demo

Features #

  • 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

Platform Support #

Android iOS MacOS Windows Linux Web

Installation #

  1. Add this package to your Flutter project's pubspec.yaml file according to the installation instructions

    dependencies:
       flutter_read: "^1.0.1"
    
  2. Import the necessary libraries

    import 'package:flutter_read/flutter_read.dart';
    

Usage #

  1. Declare a novel controller variable:

    final ReadController readController = ReadController.create();
    
  2. Add the novel widget to the interface:

    @override            
    Widget build(BuildContext context) {
      return MaterialApp(
        home: ReadView(readController: readController),
      );
    }
    
  3. Open the novel:

    final ByteData byteData = await rootBundle.load("assets/斗罗大陆.txt");
    BookSource source = ByteDataSource(byteData, "《斗罗大陆》", isSplit: true);
    int state = await readController.startReadBook(source);
    
  4. 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();
    }
    

License #

This project is released under the LGPLv3 license.

9
likes
0
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter小说阅读器

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface, synchronized

More

Packages that depend on flutter_read