v0.6.0load_items
在 ListView 或 GridView 滾動到底部時載入更多項目。
6喜歡 34近 30 天下載160Pub 分數
AndroidiOSWebmacOSWindowsLinux
在滾動到 ListView 或 GridView 底部時載入新項目
{"sdk":"flutter"}{"sdk":"flutter"}^6.0.0以下為英文專案原文快照,最新內容請造訪 GitHub。
Load new items into either a list or a grid as you scroll down.
screencast
ListView or GridViewItemsLoaderListView and GridViewloadScrollFactorListenableListenableLoadItems<Item>(
type: LoadItemsType.grid,
itemBuilder: (context, Item item, int index) {
return ListTile(title: item.title);
},
itemsLoader: (List<Item> currentItems) {
return await Api.fetch({skip: currentItems.length});
},
gridCrossAxisCount: 3,
)
See example for full list and grid example.