paint method
paint chart
Implementation
@override
void paint(Canvas canvas, Size size) {
canvas.clipRect(Rect.fromLTRB(0, 0, size.width, size.height));
mDisplayHeight = size.height - mTopPadding - mBottomPadding;
mWidth = size.width;
initRect(size);
calculateValue();
initChartRenderer();
canvas.save();
canvas.scale(1, 1);
drawBg(canvas, size);
drawGrid(canvas);
if (datas != null && datas!.isNotEmpty) {
drawChart(canvas, size);
drawVerticalText(canvas);
drawDate(canvas, size);
drawText(canvas, datas!.last, 5);
drawMaxAndMin(canvas);
drawNowPrice(canvas);
if (isLongPress == true || (isTapShowInfoDialog && isOnTap)) {
drawCrossLineText(canvas, size);
}
}
canvas.restore();
}