Carousel constructor

Carousel({
  1. Key? key,
  2. Axis scrollDirection = _defaultScrollDirection,
  3. bool reverse = _defaultReverse,
  4. CarouselController? controller,
  5. ScrollPhysics? physics,
  6. bool pageSnapping = _defaultPageSnapping,
  7. ValueChanged<int>? onPageChanged,
  8. ValueChanged<int>? onIndexChanged,
  9. List<Widget> children = const <Widget>[],
  10. 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);