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

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 installati [...]

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_read/flutter_read.dart';

import 'data.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final ReadController bookController = ReadController.create(
    loadingWidget: const Center(
      child: CircularProgressIndicator(),
    ),
    enableVerticalDrag: true
  );

  @override
  void initState() {
    start();
    super.initState();
  }

  Future<void> start() async {
    DateTime now = DateTime.now();
    BookSource source = StringSource(bookData, "《斗罗大陆》", isSplit: true);
    int state = await bookController.startReadBook(source);
    Duration duration = DateTime.now().difference(now);
    debugPrint("wwww,加载小说耗时,$duration,$state");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: const Color(0xFFE2E8DC),
        body: SafeArea(
          child: ReadView(
            readController: bookController,
            onMenu: (){
              print("wwww,拉起菜单");
            },
          ),
        ),
      ),
    );
  }
}
9
likes
0
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

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.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, synchronized

More

Packages that depend on flutter_read