Carousel constructor
const
Carousel(
- List<
Widget> units, { - Key? key,
- double height = 400.0,
- double width = 0.0,
- FunctionWithAInt? onUnitTapped,
- FunctionWithAInt? onIndicatorTapped,
- bool useindicator = true,
- Color indicatorColor = Colors.white,
- Color currentIndicatorColor = Colors.blue,
- double indicatorWidth = 40.0,
- double indicatorHeight = 26.0,
- double indicatorMargin = 3.0,
- double indicatorToBottom = 10.0,
- BoxShape indicatorShape = BoxShape.rectangle,
- FunctionIndicatorBuilder? indicatorBuilder,
- bool pageSnapping = true,
- bool padEnds = true,
- Clip clipBehavior = Clip.hardEdge,
- bool reverse = false,
- Axis scrollDirection = Axis.horizontal,
- bool disableIndicatorDefaultCallbacks = false,
- CarouselController? controller,
Implementation
const Carousel(
this.units, {
super.key,
this.height = 400.0,
this.width = 0.0,
this.onUnitTapped,
this.onIndicatorTapped,
this.useindicator = true,
this.indicatorColor = Colors.white,
this.currentIndicatorColor = Colors.blue,
this.indicatorWidth = 40.0,
this.indicatorHeight = 26.0,
this.indicatorMargin = 3.0,
this.indicatorToBottom = 10.0,
this.indicatorShape = BoxShape.rectangle,
this.indicatorBuilder,
this.pageSnapping = true,
this.padEnds = true,
this.clipBehavior = Clip.hardEdge,
this.reverse = false,
this.scrollDirection = Axis.horizontal,
this.disableIndicatorDefaultCallbacks = false,
this.controller,
});