copyWith method

ChartTheme copyWith({
  1. ChartPalette? palette,
  2. ChartTypography? typography,
  3. ChartSpacing? spacing,
  4. Color? backgroundColor,
  5. Color? gridColor,
  6. Color? axisColor,
  7. Color? axisLabelColor,
  8. Color? titleColor,
  9. Color? legendTextColor,
  10. Color? tooltipBackgroundColor,
  11. Color? tooltipTextColor,
  12. Color? tooltipBorderColor,
  13. Color? crosshairColor,
})

Create a copy with overridden values.

Implementation

ChartTheme copyWith({
  ChartPalette? palette,
  ChartTypography? typography,
  ChartSpacing? spacing,
  Color? backgroundColor,
  Color? gridColor,
  Color? axisColor,
  Color? axisLabelColor,
  Color? titleColor,
  Color? legendTextColor,
  Color? tooltipBackgroundColor,
  Color? tooltipTextColor,
  Color? tooltipBorderColor,
  Color? crosshairColor,
}) => ChartTheme(
  palette: palette ?? this.palette,
  typography: typography ?? this.typography,
  spacing: spacing ?? this.spacing,
  backgroundColor: backgroundColor ?? this.backgroundColor,
  gridColor: gridColor ?? this.gridColor,
  axisColor: axisColor ?? this.axisColor,
  axisLabelColor: axisLabelColor ?? this.axisLabelColor,
  titleColor: titleColor ?? this.titleColor,
  legendTextColor: legendTextColor ?? this.legendTextColor,
  tooltipBackgroundColor:
      tooltipBackgroundColor ?? this.tooltipBackgroundColor,
  tooltipTextColor: tooltipTextColor ?? this.tooltipTextColor,
  tooltipBorderColor: tooltipBorderColor ?? this.tooltipBorderColor,
  crosshairColor: crosshairColor ?? this.crosshairColor,
);