슬라이버를 사용하여 CustomScrollView 내에서 스틱 헤더를 구현하는 플러터 패키지입니다. 사용자가 목록이나 그리드를 스크롤할 때 헤더가 스크롤 가능한 콘텐츠의 상단에 계속 표시되도록 하여 탐색과 시각적 구성에 도움을 줍니다. 연락처, 메시지 또는 분류된 데이터와 같은 그룹화된 항목이 포함된 긴 목록에 이상적입니다. 이 패키지는 가볍고 잘 문서화되어 있으며 모든 주요 플랫폼과 호환됩니다.
사용 사례
그룹화된 목록 보기
알파벳 헤더가 있는 연락처 목록
날짜 헤더가 있는 메시지 스레드
분류된 제품 목록
섹션 헤더가 있는 스크롤 가능한 대시보드
주요 기능
Sliver 기반 구현
자동 헤더 고정
사용자 지정 가능한 헤더 스타일
부드러운 스크롤 동작
크로스 플랫폼 지원
CustomScrollView와의 간편한 통합
적합한 대상
섹션을 포함한 스크롤 가능한 목록을 구축하는 개발자
시각적으로 정리된 콘텐츠가 필요한 앱
성능 최적화 헤더가 필요한 프로젝트
플랫폼 일관성을 우선시하는 팀
고려 사항
CustomScrollView 내에서 사용해야 합니다
복잡한 헤더의 경우 추가적인 레이아웃 조정이 필요할 수 있습니다
슬리버 스크롤 컨텍스트가 아닌 경우 적합하지 않습니다
기본 스타일링을 넘어서는 사용자 정의가 제한적
매우 큰 데이터 세트와의 성능 영향
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
flutter_sticky_header
A Flutter implementation of sticky headers with a sliver as a child.
Features
Accepts one sliver as content.
Header can overlap its sliver (useful for sticky side header for example).
Notifies when the header scrolls outside the viewport.
Can scroll in any direction.
Supports overlapping (AppBars for example).
Supports not sticky headers (with sticky: false parameter).
Supports a controller which notifies the scroll offset of the current sticky header.
Getting started
In the pubspec.yaml of your flutter project, add the following dependency:
You can find more examples in the Example project.
Sponsoring
I'm working on my packages on my free-time, but I don't have as much time as I would. If this package or any other package I created is helping you, please consider to sponsor me. By doing so, I will prioritize your issues or your pull-requests before the others.
Changelog
Please see the Changelog page to know what's recently changed.
Contributions
Feel free to contribute to this project.
If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue.
If you fixed a bug or implemented a new feature, please send a pull request.
Thanks
:clap: Thanks to slightfoot with it's RenderBox version (https://github.com/slightfoot/flutter_sticky_headers) which unintentionally challenged me to work in this RenderSliver version.