withOhlc method

CandlestickDataPoint withOhlc({
  1. required double open,
  2. required double high,
  3. required double low,
  4. required double close,
})

Replaces CandlestickDataPoint.open, CandlestickDataPoint.high, CandlestickDataPoint.low, and CandlestickDataPoint.close together.

The parameters are assert-coupled, so all four only move together.

Implementation

CandlestickDataPoint withOhlc({
  required double open,
  required double high,
  required double low,
  required double close,
}) => copyWith(open: open, high: high, low: low, close: close);