copyWith method

Candle copyWith({
  1. DateTime? timestamp,
  2. double? open,
  3. double? high,
  4. double? low,
  5. double? close,
  6. double? volume,
})

Implementation

Candle copyWith({
  DateTime? timestamp,
  double? open,
  double? high,
  double? low,
  double? close,
  double? volume,
}) {
  return Candle(
    timestamp: timestamp ?? this.timestamp,
    open: open ?? this.open,
    high: high ?? this.high,
    low: low ?? this.low,
    close: close ?? this.close,
    volume: volume ?? this.volume,
  );
}