Carousel constructor
Carousel({
- Key? key,
- Axis scrollDirection = _defaultScrollDirection,
- bool reverse = _defaultReverse,
- CarouselController? controller,
- ScrollPhysics? physics,
- bool pageSnapping = _defaultPageSnapping,
- ValueChanged<
int> ? onPageChanged, - ValueChanged<
int> ? onIndexChanged, - List<
Widget> children = const <Widget>[], - CarouselTransitionBuilder? transitionBuilder,
Implementation
Carousel({
Key? key,
this.scrollDirection = _defaultScrollDirection,
this.reverse = _defaultReverse,
this.controller,
this.physics,
this.pageSnapping = _defaultPageSnapping,
this.onPageChanged,
this.onIndexChanged,
List<Widget> children = const <Widget>[],
CarouselTransitionBuilder? transitionBuilder,
}) : childrenDelegate = new CarouselChildListDelegate(children),
transitionBuilder = transitionBuilder ?? _defaultTransitionBuilder,
super(key: key);