ImageSliderStyleOptions constructor

ImageSliderStyleOptions({
  1. ImageSliderStyleEnum style = ImageSliderStyleEnum.DEFAULT,
  2. Color color = Colors.grey,
  3. double width = 200,
  4. double imageWidth = 40,
  5. Color borderColor = Colors.white,
})

Creates an ImageSliderStyleOptions instance

All parameters have sensible defaults. The options field is automatically computed based on the style and imageWidth parameters.

Throws an AssertionError if width or imageWidth are non-positive.

Implementation

ImageSliderStyleOptions({
  this.style = ImageSliderStyleEnum.DEFAULT,
  this.color = Colors.grey,
  this.width = 200,
  this.imageWidth = 40,
  this.borderColor = Colors.white,
})  : assert(width > 0, 'Width must be positive'),
      assert(imageWidth > 0, 'Image width must be positive');