{"id":13549120,"url":"https://github.com/OpenFlutter/flutter_listview_loadmore","last_synced_at":"2025-04-02T22:31:23.613Z","repository":{"id":32936434,"uuid":"146766015","full_name":"OpenFlutter/flutter_listview_loadmore","owner":"OpenFlutter","description":"flutter loadmore demos","archived":false,"fork":false,"pushed_at":"2023-05-17T05:52:58.000Z","size":337,"stargazers_count":254,"open_issues_count":23,"forks_count":54,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-03T18:34:27.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenFlutter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-30T14:57:54.000Z","updated_at":"2024-07-29T14:51:45.000Z","dependencies_parsed_at":"2024-01-16T18:23:47.271Z","dependency_job_id":null,"html_url":"https://github.com/OpenFlutter/flutter_listview_loadmore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_listview_loadmore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_listview_loadmore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_listview_loadmore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenFlutter%2Fflutter_listview_loadmore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenFlutter","download_url":"https://codeload.github.com/OpenFlutter/flutter_listview_loadmore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905105,"owners_count":20852812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:01:18.454Z","updated_at":"2025-04-02T22:31:23.010Z","avatar_url":"https://github.com/OpenFlutter.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# loadmore\n\n[![pub package](https://img.shields.io/pub/v/loadmore.svg)](https://pub.dartlang.org/packages/loadmore)\n[![GitHub](https://img.shields.io/github/license/OpenFlutter/flutter_listview_loadmore.svg)](https://github.com/OpenFlutter/flutter_listview_loadmore/tree/master/loadmore)\n\nA loadMore library\n\nSupport `ListView` and `SliverList`\n\n[中文构思思路和使用说明可以看简书](https://www.jianshu.com/p/abfd6f525316)\n\n## screenshot\n\n![img](https://github.com/CaiJingLong/some_asset/blob/master/loadmore1.gif)\n\n## whole example\n\nshow https://github.com/CaiJingLong/flutter_listview_loadmore\n\n## install\n\nin `pubspec.yaml`\n\n```yaml\ndependencies:\n  loadmore: ^2.0.1\n```\n\nimport in dartfile:\n\n```dart\nimport 'package:loadmore/loadmore.dart';\n```\n\nuse in build:\n\n```dart\n  @override\n  Widget build(BuildContext context) {\n    return new Scaffold(\n      appBar: new AppBar(\n        title: new Text(widget.title),\n      ),\n      body: Container(\n        child: LoadMore(\n          isFinish: count \u003e= 60,\n          onLoadMore: _loadMore,\n          child: ListView.builder(\n            itemBuilder: (BuildContext context, int index) {\n              return Container(\n                child: Text(list[index].toString()),\n                height: 40.0,\n                alignment: Alignment.center,\n              );\n            },\n            itemCount: count,\n          ),\n        ),\n      ),\n    );\n  }\n\n  Future\u003cbool\u003e _loadMore() async {\n    print(\"onLoadMore\");\n    await Future.delayed(Duration(seconds: 0, milliseconds: 100));\n    load();\n    return true;\n  }\n```\n\nproperties use:\n\n```properties\nchild: Widget ,required , support ListView ListView.builder ListView.separated, other is not support.\nonLoadMore:required A Function , `typedef Future\u003cbool\u003e FutureCallBack();` , reture true is success and status delay,return false or null ,then the status will change to fail.\nisFinish: bool, optional, if true, then the status will change to finish ,default is false\ndelegate: LoadMoreDelegate,optional, see the LoadMoreDelegate class,default is DefaultLoadMoreDelegate\ntextBuilder: optional, the result will show in loading view ,if you use default delegate. default is DefaultLoadMoreText.chinese,\nwhenEmptyLoad: bool ,optional, default is true, when [whenEmptyLoad] is true, and when listView children length is 0,or the itemCount is 0,not build loadMoreWidget.\n```\n\n```dart\nabstract class LoadMoreDelegate {\n  const LoadMoreDelegate();\n\n  double widgetHeight(LoadMoreStatus status) =\u003e _defaultLoadMoreHeight; // the loadMore height. default is 80.0\n\n  Duration loadMoreDelay() =\u003e Duration(milliseconds: _loadMoreDelay);// When widget is created, the refresh delay time is triggered.\n\n  Widget buildChild(LoadMoreStatus status); // build your widget in the loadmore widget.\n}\n```\n\n## other\n\nhomePage: https://github.com/CaiJingLong/flutter_listview_loadmore\nemailto me : cjl_spy@163.com\n\n## LICENSE\n\nAPACHE 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenFlutter%2Fflutter_listview_loadmore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOpenFlutter%2Fflutter_listview_loadmore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOpenFlutter%2Fflutter_listview_loadmore/lists"}