drawXAxis method

List<int> drawXAxis(
  1. Canvas canvas,
  2. Size size
)

Implementation

List<int> drawXAxis(Canvas canvas, Size size) {
  const double x1 = 10;
  double x2 = size.width - 10;
  double y1 = size.height - 30;
  double y2 = size.height - 30;

  final p1 = Offset(x1, y1);
  final p2 = Offset(x2, y2);

  final paint = Paint()
    ..color = Colors.black
    ..style = PaintingStyle.stroke
    ..strokeWidth = 1;
  canvas.drawLine(p1, p2, paint);
  return [x1.toInt() + 10, y1.toInt(), x1.toInt()];
}