copyWith method

BackgroundSpec copyWith({
  1. BackgroundKind? kind,
  2. List<int>? colors,
  3. int? angleTenths,
  4. BackgroundPattern? pattern,
  5. int? patternColor,
  6. int? patternScaleCdp,
  7. int? patternOpacityPermille,
  8. int? driftPeriodMs,
})

Implementation

BackgroundSpec copyWith({
  BackgroundKind? kind,
  List<int>? colors,
  int? angleTenths,
  BackgroundPattern? pattern,
  int? patternColor,
  int? patternScaleCdp,
  int? patternOpacityPermille,
  int? driftPeriodMs,
}) => BackgroundSpec(
  kind: kind ?? this.kind,
  colors: colors == null ? this.colors : List.unmodifiable(colors),
  angleTenths: angleTenths ?? this.angleTenths,
  pattern: pattern ?? this.pattern,
  patternColor: patternColor ?? this.patternColor,
  patternScaleCdp: patternScaleCdp ?? this.patternScaleCdp,
  patternOpacityPermille:
      patternOpacityPermille ?? this.patternOpacityPermille,
  driftPeriodMs: driftPeriodMs ?? this.driftPeriodMs,
);