DepthChartPainter constructor
DepthChartPainter(
- List<
DepthEntity> ? mBuyData, - List<
DepthEntity> ? mSellData, - Offset? pressOffset,
- bool isLongPress,
- int? fixedLength,
- Color? mBuyPathColor,
- Color? mSellPathColor,
- ChartColors chartColors,
Implementation
DepthChartPainter(
this.mBuyData,
this.mSellData,
this.pressOffset,
this.isLongPress,
this.fixedLength,
this.mBuyPathColor,
this.mSellPathColor,
this.chartColors) {
mBuyLinePaint ??= Paint()
..isAntiAlias = true
..color = this.chartColors.depthBuyColor
..style = PaintingStyle.stroke
..strokeWidth = 1.0;
mSellLinePaint ??= Paint()
..isAntiAlias = true
..color = this.chartColors.depthSellColor
..style = PaintingStyle.stroke
..strokeWidth = 1.0;
mBuyPathPaint ??= Paint()
..isAntiAlias = true
..color = (mBuyPathColor == null
? this.chartColors.depthBuyColor.withOpacity(0.2)
: mBuyPathColor)!;
mSellPathPaint ??= Paint()
..isAntiAlias = true
..color = (mSellPathColor == null
? this.chartColors.depthSellColor.withOpacity(0.2)
: mSellPathColor)!;
mBuyPath ??= Path();
mSellPath ??= Path();
init();
}