搜索插件、代码仓与 APP 分类

GitHub 代码仓renefloor/side_header_list_view

side_header_list_view

带有粘性标题的 ListView,类似于 Android 联系人页面

side_header_list_view 项目封面
星标
205
复刻
26
最近推送(UTC)
2021年3月12日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

side_header_list_view

pub package Donate

Listview with sticky headers like the Android contact page

alt text

Usage

  new SideHeaderListView(
    // Set how many items the list has
    itemCount: items.length,
    
    // Set the height of the item widgets. For now this has to be a fixed height
    itemExtend: 150.0,
    
    // Set the header builder, this needs to return the widget for the side header
    headerBuilder: (BuildContext context, int index){
      return new HeaderWidget(items[index].startDate);
    },
    
    // Set the item builder, this is everything in the row without the header
    itemBuilder: (BuildContext context, int index){
      return new ListItem(items[index]);
    },
    
    // HasSameHeader will be used to know whether the header has to be shown for a position 
    hasSameHeader: (int a, int b){
      return items[a].day == items[b].day;
    },
  );
Rene Floor GitHub avatar
GitHub 作者

Rene Floor ↗

Amersfoort, The Netherlands
语言DartObjective-CJava

此仓库发布的插件

使用的依赖

依赖清单 3 项

  • flutter{"sdk":"flutter"}
  • meta^1.1.6
  • test开发依赖^1.3.0

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗