ls_refresher 0.1.0

  • Readme
  • Changelog
  • Installing
  • 14

features #

  • Drag down refresh, pull up refresh.
  • Simply used within CustomScrollView.
  • Diy the widget displayed on over-scroll area. (use your own builder)
  • Gif image support, image changed along with drag offset.

LSTopRefresher

LSBottomRefresher

start: #

import 'package:ls_refresher/ls_refresher.dart';

then: #

new CustomScrollView(
            slivers: <Widget>[
//              new LSTopRefresher.image('images/test.gif', 'images/test2.gif',
//                  onRefresh: () {
//                return new Future<void>.delayed(const Duration(seconds: 2))
//                  ..then((re) {
//                    setState(() {
//                      changeRandomList();
//                    });
//                  });
//              }),
              new LSTopRefresher.simple(onRefresh: () {
                return new Future<void>.delayed(const Duration(seconds: 2))
                  ..then((re) {
                    setState(() {
                      changeRandomList();
                    });
                  });
              }),
              new SliverList(
                delegate: new SliverChildBuilderDelegate(
                  (BuildContext context, int index) {
                    return new _ListItem(
                      name: randomizedContacts[index][0] + '$index',
                      place: randomizedContacts[index][1],
                      date: randomizedContacts[index][2],
                      called: randomizedContacts[index][3] == 'true',
                    );
                  },
                  childCount: _listCount,
                ),
              ),
//              new LSBottomRefresher.simple(
//                onRefresh: () {
//                  return new Future<void>.delayed(const Duration(seconds: 2))
//                    ..then((re) {
////                      setState(() {
////                        _listCount += 1;
////                      });
//                    });
//                },
//              )
              new LSBottomRefresher.image(
                'images/test3.gif',
                'images/test4.gif',
                onRefresh: () {
                  return new Future<void>.delayed(const Duration(seconds: 2))
                    ..then((re) {
//                      setState(() {
//                        _listCount += 1;
//                      });
                    });
                },
              )
            ],
          ),

[0.1.0] - fix: BottomRefresher not performed correctly

[0.0.8] - fix: extent of BottomRefresher not performed correctly

[0.0.7] - feat: Support TopOffset For TopRefresher

[0.0.6] - fix: bottomRrfresher not working well on some Android Phone and some situation

[0.0.5] - fix: onRefreshExtent

[0.0.4] - expose const.dart

[0.0.2] - add liscense and guide infomation

       - fixed bugs

[0.0.1] - initialize.

Use this package as a library

1. Depend on it

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


dependencies:
  ls_refresher: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:ls_refresher/ls_refresher.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
6
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
14
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms:

Low code quality prevents platform classification.

Health issues and suggestions

Fix lib/src/image_stream_completer.dart. (-82.29 points)

Analysis of lib/src/image_stream_completer.dart failed with 6 errors, 1 hint, including:

line 64 col 9: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.

line 163 col 11: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.

line 182 col 3: 'MyImageStreamCompleter.addListener' ('void Function(void Function(ImageInfo, bool), {onError: void Function(dynamic, StackTrace)})') isn't a valid override of 'ImageStreamCompleter.addListener' ('addListener').

line 187 col 23: The argument type 'ImageListenervoid Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

line 190 col 3: 'MyImageStreamCompleter.removeListener' ('void Function(void Function(ImageInfo, bool))') isn't a valid override of 'ImageStreamCompleter.removeListener' ('removeListener').

Fix lib/src/bottom_refresher.dart. (-43.75 points)

Analysis of lib/src/bottom_refresher.dart failed with 2 errors:

line 263 col 25: The argument type 'Null Function(ImageInfo, dynamic)' can't be assigned to the parameter type 'ImageStreamListener'.

line 273 col 25: The argument type 'Null Function(ImageInfo, dynamic)' can't be assigned to the parameter type 'ImageStreamListener'.

Fix lib/src/top_refresher.dart. (-43.75 points)

Analysis of lib/src/top_refresher.dart failed with 2 errors:

line 144 col 23: The argument type 'Null Function(ImageInfo, dynamic)' can't be assigned to the parameter type 'ImageStreamListener'.

line 153 col 23: The argument type 'Null Function(ImageInfo, dynamic)' can't be assigned to the parameter type 'ImageStreamListener'.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test