무한 스크롤링과 사용자 정의 자식 위젯을 지원하는 사용자 정의 가능한 카루셀 슬라이더 위젯을 제공하는 플러터 패키지입니다. 이미지, 카드 또는 어떤 콘텐츠든 스와이프 가능한 수평 레이아웃으로 표시하는 데 이상적입니다. 부드러운 애니메이션, 자동 재생 및 여러 플랫폼에서 반응형 디자인을 제공합니다. 가볍고 기존 플러터 프로젝트에 쉽게 통합할 수 있습니다. 시각적으로 매력적인 방식으로 주목할 만한 아이템, 제품 갤러리 또는 프로모션 콘텐츠를 소개하는 데 적합합니다.
Since v2.0.0, you'll need to pass the options to CarouselOptions. For each option's usage you can refer to carousel_options.dart.
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) =>
Container(
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.