Q:

Draw multiple lines in canvas

I need to draw two lines on canvas, the first line starts at the top and second after 75% of the screen. I tried below code but when I draw the second line it is affecting the first line strokeWidth. How can I create two separate lines:
  void paint(Canvas canvas, Size size) {
    final Paint firstPaint = Paint();
    firstPaint.color = const Color.fromARGB(255, 236, 0, 140);

    final Path firstPath = Path();
    firstPath.lineTo(0, 30.0);
    firstPath.lineTo(size.width, 0);
    canvas.drawPath(firstPath, firstPaint);

    final Offset center = Offset(0.0, size.height / 2 * 1.45);

    final Paint secondPaint = Paint();
    secondPaint.style = PaintingStyle.fill;
    secondPaint.color = const Color.fromARGB(255, 236, 0, 140);

    final Path secondPath = Path();
    firstPath.lineTo(0, 80.0);
    secondPath.lineTo(size.width, 0);
    secondPath.addPath(firstPath, center);

    canvas.drawPath(secondPath, secondPaint);
  }

A:

I am guessing it is because you concatenated the two paths together and then did a repaint.
Maybe the following would fix it.   
  Path secondPath = Path()
  secondPath.addPath(path, center);
  canvas.drawPath(secondPath, mpaint);

