FastCarousel constructor

const FastCarousel({
  1. Key? key,
  2. required Widget itemBuilder(
    1. BuildContext,
    2. int
    )?,
  3. required int itemCount,
  4. List<String>? labels,
  5. double? height,
  6. double scale = 0.9,
  7. Duration duration = const Duration(seconds: 10),
  8. double fraction = 0.8,
})

Creates a new instance of FastCarousel.

The itemBuilder and itemCount parameters are required. The labels, height, scale, duration, and fraction parameters are optional.

FastCarousel(
  itemCount: 5,
  height: 200,
  scale: 0.8,
  fraction: 0.7,
  duration: Duration(seconds: 5),
  itemBuilder: (BuildContext context, int index) {
    return FastImg(path: 'https://picsum.photos/200/300?random=$index');
  },
)

Implementation

const FastCarousel({
  super.key,
  required this.itemBuilder,
  required this.itemCount,
  this.labels,
  this.height,
  this.scale = 0.9,
  this.duration = const Duration(seconds: 10),
  this.fraction = 0.8,
});