novel_reading 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 77

novel_reading #

pub 一个支持上拉加载更多和缓存的小说阅读Flutter插件。 A Flutter novel reading package supports pull-up loading more and caching.

novel_reading

How to Use #

NovelReading(
    theme: NovelReadingType.green, // use provided theme [white(default), black, green, pink]
    start: 5, // readding novel starts from chapter 5
    cache: 10, // cache 10 chapters
    color: , // setting background color
    textStyle: , // setting text style
    builder: (page) async {
        return await http.get('example.com?page=$page');
    },
)


This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.1.2] - change readme.

[0.1.1] - add anti-shake & screencapture.

[0.1.0] - 正式版本 Official version.

[0.0.1] - 实现功能 Realize the function.

example/main.dart

import 'package:flutter/material.dart';
import 'package:novel_reading/novel_reading.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';

class NovelReadingExample extends StatelessWidget {
  const NovelReadingExample({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return NovelReading(
        theme: NovelReadingType.green, // use provided theme [white(default), black, green, pink]
        start: 5, // readding novel starts from chapter 5
        cache: 10, // cache 10 chapters
        // color: , // setting background color
        // textStyle: , // setting text style
        builder: (page) async {
            return await http.get('example.com?page=$page');
        },
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  novel_reading: ^0.1.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:novel_reading/novel_reading.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
53
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
77
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Format lib/novel_reading.dart.

Run flutter format to format lib/novel_reading.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test