copyWith method

ChartStyle copyWith({
  1. double? topPadding,
  2. double? bottomPadding,
  3. double? childPadding,
  4. double? pointWidth,
  5. double? candleWidth,
  6. double? candleLineWidth,
  7. double? volWidth,
  8. double? macdWidth,
  9. double? vCrossWidth,
  10. double? hCrossWidth,
  11. double? nowPriceLineLength,
  12. double? nowPriceLineSpan,
  13. double? nowPriceLineWidth,
  14. int? gridRows,
  15. int? gridColumns,
  16. List<String>? dateTimeFormat,
})

Implementation

ChartStyle copyWith({
  double? topPadding,
  double? bottomPadding,
  double? childPadding,
  double? pointWidth,
  double? candleWidth,
  double? candleLineWidth,
  double? volWidth,
  double? macdWidth,
  double? vCrossWidth,
  double? hCrossWidth,
  double? nowPriceLineLength,
  double? nowPriceLineSpan,
  double? nowPriceLineWidth,
  int? gridRows,
  int? gridColumns,
  List<String>? dateTimeFormat,
}) {
  final newStyle = ChartStyle();

  newStyle.topPadding = topPadding ?? this.topPadding;
  newStyle.bottomPadding = bottomPadding ?? this.bottomPadding;
  newStyle.childPadding = childPadding ?? this.childPadding;
  newStyle.pointWidth = pointWidth ?? this.pointWidth;
  newStyle.candleWidth = candleWidth ?? this.candleWidth;
  newStyle.candleLineWidth = candleLineWidth ?? this.candleLineWidth;
  newStyle.volWidth = volWidth ?? this.volWidth;
  newStyle.macdWidth = macdWidth ?? this.macdWidth;
  newStyle.vCrossWidth = vCrossWidth ?? this.vCrossWidth;
  newStyle.hCrossWidth = hCrossWidth ?? this.hCrossWidth;
  newStyle.nowPriceLineLength = nowPriceLineLength ?? this.nowPriceLineLength;
  newStyle.nowPriceLineSpan = nowPriceLineSpan ?? this.nowPriceLineSpan;
  newStyle.nowPriceLineWidth = nowPriceLineWidth ?? this.nowPriceLineWidth;
  newStyle.gridRows = gridRows ?? this.gridRows;
  newStyle.gridColumns = gridColumns ?? this.gridColumns;
  newStyle.dateTimeFormat = dateTimeFormat ?? this.dateTimeFormat;

  return newStyle;
}