layout abstract method

List<Widget> layout(
  1. BuildContext context, {
  2. required double progress,
  3. required BoxConstraints constraints,
  4. required CarouselAlignment alignment,
  5. required Axis direction,
  6. required CarouselSizeConstraint sizeConstraint,
  7. required double progressedIndex,
  8. required int? itemCount,
  9. required CarouselItemBuilder itemBuilder,
  10. required bool wrap,
  11. required bool reverse,
})

Layouts the carousel items.

  • context is the build context.
  • progress is the progress of the carousel.
  • constraints is the constraints of the carousel.
  • alignment is the alignment of the carousel.
  • direction is the direction of the carousel.
  • sizeConstraint is the size constraint of the carousel.
  • progressedIndex is the progressed index of the carousel.
  • itemCount is the item count of the carousel.
  • itemBuilder is the item builder of the carousel.
  • wrap is whether the carousel should wrap.
  • reverse is whether the carousel should reverse.

Implementation

List<Widget> layout(
  BuildContext context, {
  required double progress,
  required BoxConstraints constraints,
  required CarouselAlignment alignment,
  required Axis direction,
  required CarouselSizeConstraint sizeConstraint,
  required double progressedIndex,
  required int? itemCount,
  required CarouselItemBuilder itemBuilder,
  required bool wrap,
  required bool reverse,
});