paint method
override
Main paint method that draws the entire graph
Implementation
@override
void paint(Canvas canvas, Size size) {
screenHeight = size.height;
screenWidth = size.width;
pixelsPerOneCM = screenHeight / 16;
pixelsPerOneMM = pixelsPerOneCM! / 10;
leftOffsetStart = size.width * 0.07;
topOffsetEnd = size.height * 0.9;
drawingWidth = size.width * 0.93;
drawingHeight = topOffsetEnd;
graphGridMainLines = Paint()
..color = Colors.grey[400]!
..strokeWidth = pixelsPerOneMM! * 0.65;
graphGridLines = Paint()
..color = Colors.grey[400]!
..strokeWidth = pixelsPerOneMM! * 0.40;
graphGridSubLines = Paint()
..color = Colors.grey[400]!
..strokeWidth = pixelsPerOneMM! * 0.20;
graphOutlines = Paint()
..color = Colors.black
..strokeWidth = pixelsPerOneMM! * .80;
graphSafeZone = Paint()
..color = const Color.fromARGB(40, 100, 200, 0)
..strokeWidth = pixelsPerOneMM! * .40;
graphUnSafeZone = Paint()
..color = const Color.fromARGB(40, 250, 30, 0)
..strokeWidth = pixelsPerOneMM! * .40;
graphNoiseZone = Paint()
..color = const Color.fromARGB(100, 169, 169, 169)
..strokeWidth = pixelsPerOneMM! * .40;
graphBpmLine = Paint()
..color = Colors.blue
..strokeWidth = pixelsPerOneMM! * .40;
graphBpmLine2 = Paint()
..color = Colors.black54
..strokeWidth = pixelsPerOneMM! * .40;
graphBaseLine = Paint()
..color = Colors.blueGrey
..strokeWidth = pixelsPerOneMM! * .50;
Color mhrColor = const Color.fromRGBO(197, 11, 95, 1.0);//Color(0xFFEA62AB);
graphMHRLine = Paint()
..color = mhrColor
..strokeWidth = pixelsPerOneMM! * .40;
init(size);
drawGraph(canvas);
}