CarouselController constructor

CarouselController(
  1. {int initialPage = 0,
  2. bool keepPage = true,
  3. double viewportFraction = 1.0,
  4. bool autoPlay = false,
  5. int autoPlayDelay = _defaultAutoPlayDelay,
  6. Duration duration = _defaultDuration,
  7. Curve curve = _defaultCurve}
)

Implementation

CarouselController({
  int initialPage = 0,
  bool keepPage = true,
  double viewportFraction = 1.0,
  bool autoPlay = false,
  int autoPlayDelay = _defaultAutoPlayDelay,
  Duration duration = _defaultDuration,
  Curve curve = _defaultCurve,
})  : assert(initialPage != null),
      assert(keepPage != null),
      assert(viewportFraction != null),
      assert(viewportFraction > 0.0),
      assert(autoPlay != null),
      assert(autoPlayDelay != null),
      assert(duration != null),
      assert(curve != null),
      _initialPage = initialPage,
      _keepPage = keepPage,
      _viewportFraction = viewportFraction,
      _autoPlayDelay = autoPlayDelay,
      _duration = duration,
      _autoPlay = autoPlay,
      _curve = curve;