ChartPainter constructor

ChartPainter(
  1. ChartStyle chartStyle,
  2. ChartColors chartColors, {
  3. required dynamic datas,
  4. required dynamic scaleX,
  5. required dynamic scrollX,
  6. required dynamic isLongPass,
  7. required dynamic selectX,
  8. dynamic mainState,
  9. dynamic volHidden,
  10. dynamic secondaryState,
  11. StreamSink<InfoWindowEntity?>? sink,
  12. bool isLine = false,
  13. bool hideGrid = false,
  14. List<Color>? bgColor,
  15. int fixedLength = 2,
  16. List<int> maDayList = const [5, 10, 20],
})

Implementation

ChartPainter(
  this.chartStyle,
  this.chartColors, {
  required datas,
  required scaleX,
  required scrollX,
  required isLongPass,
  required selectX,
  mainState,
  volHidden,
  secondaryState,
  this.sink,
  bool isLine = false,
  this.hideGrid = false,
  this.bgColor,
  this.fixedLength = 2,
  this.maDayList = const [5, 10, 20],
})  : assert(bgColor == null || bgColor.length >= 2),
      super(chartStyle,
          datas: datas,
          scaleX: scaleX,
          scrollX: scrollX,
          isLongPress: isLongPass,
          selectX: selectX,
          mainState: mainState,
          volHidden: volHidden,
          secondaryState: secondaryState,
          isLine: isLine) {
  selectPointPaint = Paint()
    ..isAntiAlias = true
    ..strokeWidth = 0.5
    ..color = this.chartColors.selectFillColor;
  selectorBorderPaint = Paint()
    ..isAntiAlias = true
    ..strokeWidth = 0.5
    ..style = PaintingStyle.stroke
    ..color = this.chartColors.selectBorderColor;
  nowPricePaint = Paint()
    ..strokeWidth = this.chartStyle.nowPriceLineWidth
    ..isAntiAlias = true;
}