copyWith method

DynamicColor copyWith({
  1. String? name,
  2. DynamicSchemeCallback<TonalPalette>? palette,
  3. DynamicSchemeCallback<double>? tone,
  4. bool? isBackground,
})

Implementation

DynamicColor copyWith({
  String? name,
  DynamicSchemeCallback<TonalPalette>? palette,
  DynamicSchemeCallback<double>? tone,
  bool? isBackground,
}) => name != null || palette != null || tone != null || isBackground != null
    ? DynamicColor(
        name: name ?? this.name,
        palette: palette ?? this.palette,
        tone: tone ?? this.tone,
        isBackground: isBackground ?? this.isBackground,
        chromaMultiplier: chromaMultiplier,
        background: background,
        secondBackground: secondBackground,
        contrastCurve: contrastCurve,
        toneDeltaPair: toneDeltaPair,
        opacity: opacity,
      )
    : this;