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