v1.0.1
lazy_loading_list
惰性加载小部件,通过项目的索引递增来加载更多项目,实现类似无限滚动的列表。
41喜欢 118近 30 天下载135Pub 分数
AndroidiOSWebmacOSWindowsLinux
惰性加载小部件,通过项目的索引递增来加载更多项目,实现类似无限滚动的列表。
{"sdk":"flutter"}{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
Lazy loading Widget to load more by index item to incresent you list like infinite scroll.
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
...
lazy_loading_list: version
In your library add the following import:
import 'package:lazy_loading_list/lazy_loading_list.dart';
ListView.builder(
itemCount: items.length,
itemBuilder: (BuildContext context, int index) {
return LazyLoadingList(
initialSizeOfItems: 10,
index: index,
child: buildItem(),
loadMore: loadMoreItems,
hasMore: hasMoreToLoad,
);
},
),