copyWith method

ChartTheme copyWith({
  1. Color? backgroundColor,
  2. Color? textColor,
  3. Color? gridColor,
  4. Color? axisColor,
  5. List<Color>? gradientColors,
  6. double? shadowElevation,
  7. double? borderRadius,
  8. bool? showGrid,
  9. bool? showAxis,
  10. bool? showLegend,
  11. bool? showTooltip,
})

Copy with method for customization

Implementation

ChartTheme copyWith({
  Color? backgroundColor,
  Color? textColor,
  Color? gridColor,
  Color? axisColor,
  List<Color>? gradientColors,
  double? shadowElevation,
  double? borderRadius,
  bool? showGrid,
  bool? showAxis,
  bool? showLegend,
  bool? showTooltip,
}) {
  return ChartTheme(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    textColor: textColor ?? this.textColor,
    gridColor: gridColor ?? this.gridColor,
    axisColor: axisColor ?? this.axisColor,
    gradientColors: gradientColors ?? this.gradientColors,
    shadowElevation: shadowElevation ?? this.shadowElevation,
    borderRadius: borderRadius ?? this.borderRadius,
    showGrid: showGrid ?? this.showGrid,
    showAxis: showAxis ?? this.showAxis,
    showLegend: showLegend ?? this.showLegend,
    showTooltip: showTooltip ?? this.showTooltip,
  );
}