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,
);
},
),