ExtendedList는 표준 리스트 위젯에 컬렉션 추적 및 가비지 컬렉션, 뷰포트 인덱스, 사용자 정의 마지막 자식 레이아웃과 같은 고급 기능을 추가하는 Flutter 패키지입니다. 리스트의 끝 부분에 대한 정밀한 제어를 가능하게 하여 개발자가 끝부분 근처에 성능과 유연성이 향상된 레이아웃을 구축할 수 있도록 합니다. 아이템 렌더링 및 위치 조절에 세밀한 제어가 필요한 복잡한 스크롤 시나리오에 이상적입니다.
extended list(ListView/GridView) support track collect garbage of children/viewport indexes, build lastChild as special child in the case that it is loadmore/no more item and enable to layout close to trailing.
build lastChild as special child in the case that it is loadmore/no more item.
enumLastChildLayoutType {
/// as default child
none,
/// follow max child trailing layout offset and layout with full cross axis extent/// last child as loadmore item/no more item in [ExtendedGridView] and [WaterfallFlow]/// with full cross axis extend
fullCrossAxisExtent,
/// as foot at trailing and layout with full cross axis extend/// show no more item at trailing when children are not full of viewport/// if children is full of viewport, it's the same as fullCrossAxisExtent
foot,
}
ExtendedListView.builder(
extendedListDelegate: ExtendedListDelegate(
lastChildLayoutTypeBuilder: (index) => index == length
? LastChildLayoutType.foot
: LastChildLayoutType.none,
),
CloseToTrailing
when reverse property of List is true, layout is as following.
it likes chat list, and new session will insert to zero index.
but it's not right when items are not full of viewport.
to solve it, you could set closeToTrailing to true, layout is as following.
support [ExtendedGridView],[ExtendedList],[WaterfallFlow].
and it also works when reverse is flase, layout will close to trailing.