copyWith method

CardCarouselTheme copyWith({
  1. int? sharpness,
})

Returns a new CardCarouselTheme with specified fields overridden.

This method facilitates immutable theme updates by copying the current instance and applying changes only to provided parameters. It is useful for theme merging in ArcaneTheme extensions or when propagating partial updates.

Parameters:

  • sharpness: int? (optional) - New sharpness value; retains original if null.

Returns: CardCarouselTheme - Updated theme instance.

Example:

final updated = original.copyWith(sharpness: 10);

Implementation

CardCarouselTheme copyWith({int? sharpness}) =>
    CardCarouselTheme(sharpness: sharpness ?? this.sharpness);