copyWith method

KLineChartStyle copyWith({
  1. Color? backgroundColor,
  2. Color? gridLineColor,
  3. double? gridLineWidth,
  4. TextStyle? rulerTextStyle,
  5. Color? highLowLineColor,
  6. double? highLowLineWidth,
  7. TextStyle? highLowTextStyle,
  8. Color? currentPriceLineColor,
  9. double? currentPriceLineWidth,
  10. Color? currentPriceBackgroundColor,
  11. TextStyle? currentPriceTextStyle,
  12. Color? timeLineColor,
  13. double? timeLineWidth,
  14. Color? timeLineFillColor,
})

Returns a copy with selected values replaced.

Implementation

KLineChartStyle copyWith({
  Color? backgroundColor,
  Color? gridLineColor,
  double? gridLineWidth,
  TextStyle? rulerTextStyle,
  Color? highLowLineColor,
  double? highLowLineWidth,
  TextStyle? highLowTextStyle,
  Color? currentPriceLineColor,
  double? currentPriceLineWidth,
  Color? currentPriceBackgroundColor,
  TextStyle? currentPriceTextStyle,
  Color? timeLineColor,
  double? timeLineWidth,
  Color? timeLineFillColor,
}) {
  return KLineChartStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    gridLineColor: gridLineColor ?? this.gridLineColor,
    gridLineWidth: gridLineWidth ?? this.gridLineWidth,
    rulerTextStyle: rulerTextStyle ?? this.rulerTextStyle,
    highLowLineColor: highLowLineColor ?? this.highLowLineColor,
    highLowLineWidth: highLowLineWidth ?? this.highLowLineWidth,
    highLowTextStyle: highLowTextStyle ?? this.highLowTextStyle,
    currentPriceLineColor:
        currentPriceLineColor ?? this.currentPriceLineColor,
    currentPriceLineWidth:
        currentPriceLineWidth ?? this.currentPriceLineWidth,
    currentPriceBackgroundColor:
        currentPriceBackgroundColor ?? this.currentPriceBackgroundColor,
    currentPriceTextStyle:
        currentPriceTextStyle ?? this.currentPriceTextStyle,
    timeLineColor: timeLineColor ?? this.timeLineColor,
    timeLineWidth: timeLineWidth ?? this.timeLineWidth,
    timeLineFillColor: timeLineFillColor ?? this.timeLineFillColor,
  );
}