copyWith method

ChartTheme copyWith({
  1. Color? backgroundColor,
  2. Color? bullishColor,
  3. Color? bearishColor,
  4. Color? bullishTransparent,
  5. Color? bearishTransparent,
  6. Color? gridColor,
  7. Color? axisTextColor,
  8. Color? axisLineColor,
  9. Color? crosshairColor,
  10. Color? crosshairBadgeBackground,
  11. Color? crosshairBadgeTextColor,
  12. Color? currentPriceLineColor,
  13. Color? currentPriceBadgeBackground,
  14. Color? currentPriceBadgeTextColor,
  15. TextStyle? axisTextStyle,
  16. TextStyle? tooltipTextStyle,
})

Creates a copy of this theme with the given fields replaced with new values.

Implementation

ChartTheme copyWith({
  Color? backgroundColor,
  Color? bullishColor,
  Color? bearishColor,
  Color? bullishTransparent,
  Color? bearishTransparent,
  Color? gridColor,
  Color? axisTextColor,
  Color? axisLineColor,
  Color? crosshairColor,
  Color? crosshairBadgeBackground,
  Color? crosshairBadgeTextColor,
  Color? currentPriceLineColor,
  Color? currentPriceBadgeBackground,
  Color? currentPriceBadgeTextColor,
  TextStyle? axisTextStyle,
  TextStyle? tooltipTextStyle,
}) {
  return ChartTheme(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    bullishColor: bullishColor ?? this.bullishColor,
    bearishColor: bearishColor ?? this.bearishColor,
    bullishTransparent: bullishTransparent ?? this.bullishTransparent,
    bearishTransparent: bearishTransparent ?? this.bearishTransparent,
    gridColor: gridColor ?? this.gridColor,
    axisTextColor: axisTextColor ?? this.axisTextColor,
    axisLineColor: axisLineColor ?? this.axisLineColor,
    crosshairColor: crosshairColor ?? this.crosshairColor,
    crosshairBadgeBackground:
        crosshairBadgeBackground ?? this.crosshairBadgeBackground,
    crosshairBadgeTextColor:
        crosshairBadgeTextColor ?? this.crosshairBadgeTextColor,
    currentPriceLineColor:
        currentPriceLineColor ?? this.currentPriceLineColor,
    currentPriceBadgeBackground:
        currentPriceBadgeBackground ?? this.currentPriceBadgeBackground,
    currentPriceBadgeTextColor:
        currentPriceBadgeTextColor ?? this.currentPriceBadgeTextColor,
    axisTextStyle: axisTextStyle ?? this.axisTextStyle,
    tooltipTextStyle: tooltipTextStyle ?? this.tooltipTextStyle,
  );
}