LoopPageView는 양방향으로 원활하고 무한 스크롤이 가능한 PageView 기능을 확장하는 Flutter 패키지입니다. 표준 PageView 빌더 생성자를 감싸서 사용자가 인덱스를 수동으로 관리하지 않고도 무한 스크롤 가능한 목록을 만들 수 있도록 합니다. 캐러셀, 이미지 갤러리 또는 지속적인 탐색이 필요한 모든 UI에 적합합니다. 이 패키지는 모든 주요 플랫폼을 지원하며 최소한의 설정으로 구현을 단순화합니다.
사용 사례
무한 이미지 슬라이더
지속적인 제품 캐러셀
끝없는 콘텐츠 피드
인터랙티브 온보딩 화면
동적 데이터 표시
주요 기능
양방향 무한 스크롤
간단한 빌더 패턴 통합
크로스 플랫폼 지원
최소한의 보일러플레이트
자동 인덱스 처리
적합한 대상
무한 스크롤 인터페이스를 구축하는 개발자
부드러운 전환을 필요로 하는 UI 디자이너
반복적인 콘텐츠 레이아웃을 가진 앱
유연한 탐색이 필요한 모바일 및 웹 애플리케이션
고려 사항
무거운 위젯 사용 시 성능에 영향을 줄 수 있습니다
신중한 메모리 관리가 필요합니다
최적화 없이 매우 큰 데이터 세트에는 적합하지 않음
기본 루핑을 넘어서는 사용자 정의가 제한적
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
loop_page_view
LoopPageView is an enhanced PageViewbuilder for Flutter, enabling infinite scrolling in both directions. It utilizes a customLoopPageController that supports direct animated jumps between pages and configurable scrolling and looping behavior. You can set the scrolling direction and control the start of infinite looping for precise customization
LoopPageView operates exactly like a PageViewbuilder constructor, but it always requires an item count, as well as a LoopPageController as its controller. The LoopPageController functions similarly to a PageController, but it correctly handles the endless scrolling of LoopPageView.
A new method, animateJumpToPage, has been added to LoopPageController. This allows it to animate a jump to any page without having to build the intervening pages, provided that viewportFraction is set to 1.0.
The direction to which the LoopPageViewController animates can be set by updating LoopPageViewController.scrollMode. LoopScrollMode.shortest animates in the direction that requires the least amount of steps. On the other hand, LoopScrollMode.forwards always animates forwards, and LoopScrollMode.backwards always animates backwards.
You can set when the infinite looping starts setting LoopPageViewContoller' LoopActivationMode with the following modes:
LoopActivationMode.immediate: This mode triggers infinite looping right from the first page, immediately after the LoopPageView is launched.
LoopActivationMode.afterFirstLoop: In this mode, infinite looping is only triggered after the first complete forward loop is performed.
LoopActivationMode.forwardOnly: This mode enables only forward infinite scrolling, preventing backward looping.