copyWith method

CarpetStyle copyWith({
  1. bool? allowHoles,
  2. int? maxQuiltHeight,
  3. int? maxSizeOptions,
  4. int? maxTileHeight,
  5. int? maxTileWidth,
  6. int carpetWidthCalc(
    1. BuildContext
    )?,
  7. int? carpetWidth,
  8. double? spacing,
  9. bool? allowFutureFeeding,
  10. bool? allowPastFeeding,
  11. bool? includeHorizontalPadding,
  12. Duration? loadMoreCooldown,
  13. int? unseenQuiltTarget,
  14. bool? allowScalarTiles,
  15. int? minTileWidth,
  16. int? minTileHeight,
  17. double? unknownExtentOfScreenMultiplier,
})

Creates a copy of this CarpetStyle with optional overrides.

Allows immutable updates for fluent configuration, preserving unchanged properties. Essential for style variations in Carpet and QuiltFaucet without mutating originals.

Implementation

CarpetStyle copyWith({
  bool? allowHoles,
  int? maxQuiltHeight,
  int? maxSizeOptions,
  int? maxTileHeight,
  int? maxTileWidth,
  int Function(BuildContext)? carpetWidthCalc,
  int? carpetWidth,
  double? spacing,
  bool? allowFutureFeeding,
  bool? allowPastFeeding,
  bool? includeHorizontalPadding,
  Duration? loadMoreCooldown,
  int? unseenQuiltTarget,
  bool? allowScalarTiles,
  int? minTileWidth,
  int? minTileHeight,
  double? unknownExtentOfScreenMultiplier,
}) =>
    CarpetStyle(
      unknownExtentOfScreenMultiplier: unknownExtentOfScreenMultiplier ??
          this.unknownExtentOfScreenMultiplier,
      allowHoles: allowHoles ?? this.allowHoles,
      maxQuiltHeight: maxQuiltHeight ?? this.maxQuiltHeight,
      maxSizeOptions: maxSizeOptions ?? this.maxSizeOptions,
      maxTileHeight: maxTileHeight ?? this.maxTileHeight,
      maxTileWidth: maxTileWidth ?? this.maxTileWidth,
      carpetWidthCalc: carpetWidthCalc ?? this.carpetWidthCalc,
      carpetWidth: carpetWidth ?? this.carpetWidth,
      spacing: spacing ?? this.spacing,
      allowFutureFeeding: allowFutureFeeding ?? this.allowFutureFeeding,
      allowPastFeeding: allowPastFeeding ?? this.allowPastFeeding,
      includeHorizontalPadding:
          includeHorizontalPadding ?? this.includeHorizontalPadding,
      loadMoreCooldown: loadMoreCooldown ?? this.loadMoreCooldown,
      unseenQuiltTarget: unseenQuiltTarget ?? this.unseenQuiltTarget,
      allowScalarTiles: allowScalarTiles ?? this.allowScalarTiles,
      minTileWidth: minTileWidth ?? this.minTileWidth,
      minTileHeight: minTileHeight ?? this.minTileHeight,
    );