DepthChartPainter constructor

DepthChartPainter(
  1. List<DepthEntity>? mBuyData,
  2. List<DepthEntity>? mSellData,
  3. Offset? pressOffset,
  4. bool isLongPress,
  5. int baseUnit,
  6. int quoteUnit,
  7. DepthChartColors chartColors,
  8. DepthChartStyle chartStyle,
  9. Offset offset,
  10. DepthChartTranslations chartTranslations,
)

Implementation

DepthChartPainter(
  this.mBuyData,
  this.mSellData,
  this.pressOffset,
  this.isLongPress,
  this.baseUnit,
  this.quoteUnit,
  this.chartColors,
  this.chartStyle,
  this.offset,
  this.chartTranslations,
) {
  mBuyLinePaint ??= Paint()
    ..isAntiAlias = true
    ..color = this.chartColors.upColor
    ..style = PaintingStyle.stroke
    ..strokeWidth = chartStyle.lineWidth;
  mSellLinePaint ??= Paint()
    ..isAntiAlias = true
    ..color = this.chartColors.dnColor
    ..style = PaintingStyle.stroke
    ..strokeWidth = chartStyle.lineWidth;

  mBuyPathPaint ??= Paint()
    ..isAntiAlias = true
    ..color = this.chartColors.upFillPathColor;
  mSellPathPaint ??= Paint()
    ..isAntiAlias = true
    ..color = this.chartColors.dnFillPathColor;
  mBarrierPathPaint ??= Paint()
    ..isAntiAlias = true
    ..color = this.chartColors.barrierColor;
  crossPaint = Paint()
    ..isAntiAlias = true
    ..strokeWidth = this.chartStyle.crossWidth
    ..color = this.chartColors.crossColor;

  mBuyPath ??= Path();
  mSellPath ??= Path();
  init();
}