CarouselConfig constructor

const CarouselConfig({
  1. @JsonKey.new(name: 'auto_play') @Default.new(false) bool autoPlay,
  2. @JsonKey.new(name: 'auto_play_interval') @Default.new(5000) int autoPlayInterval,
  3. @JsonKey.new(name: 'show_indicators') @Default.new(true) bool showIndicators,
  4. @JsonKey.new(name: 'show_arrows') @Default.new(true) bool showArrows,
  5. @JsonKey.new(name: 'items_visible') @Default.new(1) int itemsVisible,
  6. @Default.new(12.0) double spacing,
})

Implementation

const factory CarouselConfig({
  @JsonKey(name: 'auto_play') @Default(false) bool autoPlay,
  @JsonKey(name: 'auto_play_interval') @Default(5000) int autoPlayInterval,
  @JsonKey(name: 'show_indicators') @Default(true) bool showIndicators,
  @JsonKey(name: 'show_arrows') @Default(true) bool showArrows,
  @JsonKey(name: 'items_visible') @Default(1) int itemsVisible,
  @Default(12.0) double spacing,
}) = _CarouselConfig;