Skip to content
pubscout

carousel_slider

5.1.2, released 9 months ago by serenader.me

Carousel slider widget with infinite scroll, auto play, and custom child support

WASM-ready
$ flutter pub add carousel_slider
Source repository

What it does

Provides a horizontally or vertically scrollable carousel of widgets. Supports infinite looping, auto‑play, custom indicators, and a controller for programmatic navigation.

AI-written summary of version 5.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a simple image or content carousel
  • You want auto‑play or infinite scrolling
  • You need a controller to jump or animate to pages

Skip it when

  • You require complex state management beyond the carousel
  • You need a highly custom animation that the widget does not expose

Strengths

  • Easy to use API
  • Supports infinite scroll and auto‑play
  • Customizable via CarouselOptions
  • Works on all Flutter platforms

Weaknesses

  • Limited to carousel use case
  • No built‑in state management integration
  • Requires manual disposal of controller for memory leaks

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency and import package

CarouselSlider(
  options: CarouselOptions(height: 400.0, autoPlay: true),
  items: [1,2,3,4,5].map((i) => Builder(builder: (context) => Container(width: MediaQuery.of(context).size.width, margin: EdgeInsets.symmetric(horizontal: 5.0), color: Colors.amber, child: Text('text $i')))).toList(),
)

Alternatives

Packages that do the same job and could replace carousel_slider.

Works with

Packages commonly used together with carousel_slider: ones it builds on, ones built on it, and its own family.