FLUTTER ECOSYSTEM

isacjunior/lazy_loading_list

懶加載組件,透過項目索引遞增來載入更多項目,類似無限滾動的清單。

懶加載清單 專案封面
Stars
5
Forks
1
最近推送(UTC)
2021年3月10日
專案狀態
未封存
Isac GitHub avatar
GITHUB User

Isac ↗

Software Engineer at Nubank

Uberlândia - Brazil官方網站 ↗
語言DartRubySwiftKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 2 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

lazy_loading_list

Lazy loading Widget to load more by index item to incresent you list like infinite scroll.

Getting Started

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';

Usage

ListView.builder(
    itemCount: items.length,
    itemBuilder: (BuildContext context, int index) {
        return LazyLoadingList(
            initialSizeOfItems: 10,
            index: index,
            child: buildItem(),
            loadMore: loadMoreItems,
            hasMore: hasMoreToLoad,
        );
    },
),