무한 스크롤과 사용자 정의 자식 위젯을 지원하는 부드럽고 사용자 지정 가능한 카루셀 슬라이더를 만들기 위한 플러터 위젯입니다. 이미지, 카드 또는 어떤 콘텐츠든 시각적으로 매력적인 수평 또는 수직 스크롤 레이아웃에서 표시하기에 적합합니다. 이 패키지는 가볍고 모바일, 웹, 데스크톱을 포함한 여러 플랫폼 앱에 원활하게 통합됩니다. 개발자는 인디케이터, 자동 재생 및 스와이프 제스처를 쉽게 구성하여 사용자 경험을 향상시킬 수 있습니다.
사용 사례
이미지 갤러리 표시
제품 캐러셀 표시
온보딩 화면 만들기
주목할 만한 콘텐츠 소개
인터랙티브 슬라이더 만들기
프로모션 배너 강조
주요 기능
무한 스크롤 지원
사용자 지정 가능한 자식 위젯
자동 재생 기능
지표 사용자 정의
크로스 플랫폼 호환성
부드러운 애니메이션
적합한 대상
모바일 앱 개발자
웹 애플리케이션 제작자
데스크톱 앱 통합자
UI/UX 디자이너
전자상거래 애플리케이션
온보딩 화면 구현
고려 사항
대규모 데이터 세트에 대한 최적화가 필요할 수 있습니다
제한된 내장 스타일링 옵션
중량 자식 위젯으로 인한 성능 영향
복잡한 중첩 레이아웃에 적합하지 않습니다
터치 이벤트를 수동으로 처리해야 합니다
고급 기능을 위해 외부 종속성에 의존합니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
carousel_slider_plus
A carousel slider widget.
This package is fork of carousel_slider which is not actively maintained.
If you pass the height parameter, the aspectRatio parameter will be ignored.
Build item widgets on demand
This method will save memory by building items once it becomes necessary. This way they won't be built if they're not currently meant to be visible on screen.
It can be used to build different child item widgets related to content or by item index.
CarouselSlider.builder(
itemCount: 15,
itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) {
returnContainer(
child: Text(itemIndex.toString()),
);
}
)
Carousel controller
In order to manually control the PageView's position, you can create your own CarouselSliderController, and pass it to CarouselSlider. Then you can use the CarouselSliderController instance to manipulate the position.
/// Animate to the next page
controller.nextPage({Duration duration, Curve curve});
/// Animate to the previous page
controller.previousPage({Duration duration, Curve curve});
/// Jump to the given page.
controller.jumpToPage(int page);
/// Animate to the given page.
controller.animateToPage(int page, {Duration duration, Curve curve});
/// Start/Stop Auto-play (only work if `autoplay` is set to true in `CarouselOptions`)
controller.startAutoPlay();
Screenshots
Basic text carousel slider:
Basic image carousel slider:
A more complicated image carousel slider:
Full Screen image carousel slider:
Image carousel slider with custom indicator:
Manually control the page position:
Vertical carousel slider:
Simple on-demand image carousel slider, with image auto prefetch:
No infinite scroll:
All screenshots above can be found at the example project.