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

An Listview with the Load more item and refresh

Load More Listview #

An Listview with the Load more item and refresh

LoadMoreListView.builder

Getting Started #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  loadmore_listview: ^1.0.0

Import it:

import 'package:loadmore_listview/loadmore_listview.dart';

Usage Examples #

LoadMoreListView.builder #

LoadMoreListView.builder(
    haveMoreItem: true,
    //Trigger the bottom loadmore callback
    onLoadMore: () async{
      //await your api
      await Future.delayed(const Duration(seconds: 1));
    },
    //pull down refresh callback
    onRefresh: () async{
      //await your api
      await Future.delayed(const Duration(seconds: 1));
    },
    //you can set your loadmore Animation
    loadMoreWidget: Container(
        margin: const EdgeInsets.all(20.0),
        alignment: Alignment.center,
        child: const CircularProgressIndicator(
          valueColor: AlwaysStoppedAnimation(Colors.blueAccent),
        ),
    ),
    itemCount: 20,
    itemBuilder: (context, index) {
        return Container(
            margin: const EdgeInsets.all(30),
            width: double.infinity,
            alignment: Alignment.center,
            child: Text('$index'),
        );
    },
);

LoadMoreListView.separated #

// Here, default theme colors are used for activeBgColor, activeFgColor, inactiveBgColor and inactiveFgColor
LoadMoreListView.builder(
    //...
    separatorBuilder: (context, index) {
      return const Divider();
    },
);
19
likes
0
pub points
89%
popularity

Publisher

verified publisherstevenhsiao.dev

An Listview with the Load more item and refresh

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on loadmore_listview