FLUTTER ECOSYSTEM

renefloor/side_header_list_view

Android 연락처 페이지와 같이 스티키 헤더가 있는 ListView

side_header_list_view 프로젝트 이미지
Stars
205
Forks
26
최근 푸시(UTC)
2021. 3. 12.
프로젝트 상태
활성
Rene Floor GitHub avatar
GITHUB User

Rene Floor ↗

Amersfoort, The Netherlands
언어DartObjective-CJava

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • meta^1.1.6
  • test개발 의존성^1.3.0

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

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