copyWith method

CarouselTheme copyWith({
  1. ValueGetter<CarouselAlignment?>? alignment,
  2. ValueGetter<Axis?>? direction,
  3. ValueGetter<bool?>? wrap,
  4. ValueGetter<bool?>? pauseOnHover,
  5. ValueGetter<Duration?>? autoplaySpeed,
  6. ValueGetter<bool?>? draggable,
  7. ValueGetter<Duration?>? speed,
  8. ValueGetter<Curve?>? curve,
})

Implementation

CarouselTheme copyWith({
  ValueGetter<CarouselAlignment?>? alignment,
  ValueGetter<Axis?>? direction,
  ValueGetter<bool?>? wrap,
  ValueGetter<bool?>? pauseOnHover,
  ValueGetter<Duration?>? autoplaySpeed,
  ValueGetter<bool?>? draggable,
  ValueGetter<Duration?>? speed,
  ValueGetter<Curve?>? curve,
}) {
  return CarouselTheme(
    alignment: alignment == null ? this.alignment : alignment(),
    direction: direction == null ? this.direction : direction(),
    wrap: wrap == null ? this.wrap : wrap(),
    pauseOnHover: pauseOnHover == null ? this.pauseOnHover : pauseOnHover(),
    autoplaySpeed:
        autoplaySpeed == null ? this.autoplaySpeed : autoplaySpeed(),
    draggable: draggable == null ? this.draggable : draggable(),
    speed: speed == null ? this.speed : speed(),
    curve: curve == null ? this.curve : curve(),
  );
}