loadmore 0.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 94

loadmore #

A loadMore library

only support listview

screenshot #

img

whole example #

show https://github.com/CaiJingLong/flutter_listview_loadmore

install #

in pubspec.yaml

dependencies:
  loadmore: ^0.1.0

import in dartfile:

import 'package:loadmore/loadmore.dart';

use in build:

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text(widget.title),
      ),
      body: Container(
        child: LoadMore(
          isFinish: count >= 60, //
          onLoadMore: _loadMore,
          child: ListView.builder(
            itemBuilder: (BuildContext context, int index) {
              return Container(
                child: Text(list[index].toString()),
                height: 40.0,
                alignment: Alignment.center,
              );
            },
            itemCount: count,
          ),
          delegate:,
        ),
      ),
    );
  }

  Future<bool> _loadMore() async {
    print("onLoadMore");
    await Future.delayed(Duration(seconds: 0, milliseconds: 100));
    load();
    return true;
  }

properties use:

child: Widget ,required , support ListView ListView.builder ListView.separated, other is not support. 
onLoadMore: A Function , `typedef Future<bool> FutureCallBack();` ,required , reture true is success and status delay,return false or null ,then the status will change to fail.
isFinish: bool, if true, then the status will change to finish ,default is false
delegate: LoadMoreDelegate, see the LoadMoreDelegate class,default is DefaultLoadMoreDelegate
textBuilder: the result will show in loading view ,if you use default delegate. default is DefaultLoadMoreText.chinese,
abstract class LoadMoreDelegate {
  const LoadMoreDelegate();

  double widgetHeight(LoadMoreStatus status) => _defaultLoadMoreHeight; // the loadMore height. default is 80.0

  Duration loadMoreDelay() => Duration(milliseconds: _loadMoreDelay);// When widget is created, the refresh delay time is triggered.

  Widget buildChild(LoadMoreStatus status); // build your widget in the loadmore widget.
}

other #

homePage: https://github.com/CaiJingLong/flutter_listview_loadmore emailto me : cjl_spy@163.com

LICENSE #

APACHE 2.0

[0.1.0] update readme

[0.0.2] update text

the text can set use default style

[0.0.1] first version

Use this package as a library

1. Depend on it

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


dependencies:
  loadmore: ^0.1.0

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:loadmore/loadmore.dart';
  
Version Uploaded Documentation Archive
1.0.3 Feb 10, 2019 Go to the documentation of loadmore 1.0.3 Download loadmore 1.0.3 archive
1.0.2 Dec 24, 2018 Go to the documentation of loadmore 1.0.2 Download loadmore 1.0.2 archive
1.0.1 Sep 14, 2018 Go to the documentation of loadmore 1.0.1 Download loadmore 1.0.1 archive
1.0.0 Sep 14, 2018 Go to the documentation of loadmore 1.0.0 Download loadmore 1.0.0 archive
0.1.2 Sep 7, 2018 Go to the documentation of loadmore 0.1.2 Download loadmore 0.1.2 archive
0.1.1 Sep 3, 2018 Go to the documentation of loadmore 0.1.1 Download loadmore 0.1.1 archive
0.1.0 Sep 2, 2018 Go to the documentation of loadmore 0.1.0 Download loadmore 0.1.0 archive
0.0.2 Sep 1, 2018 Go to the documentation of loadmore 0.0.2 Download loadmore 0.0.2 archive
0.0.1 Sep 1, 2018 Go to the documentation of loadmore 0.0.1 Download loadmore 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
91
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
94
Learn more about scoring.

We analyzed this package on May 23, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.1
  • pana: 0.12.16
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and loadmore.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test