I would like to know if there is any logic or function to get a bool when two lines overlap, I tried to do it myself with for cycles of each List<Offset>, however each Offset is not exact, because depending on how you draw it, you put a point and then add the line, something like that is my code to draw :
void _drawFromPointList(Canvas canvas, DrawnShape currentShape) {
final Path path = Path();
final pointList = currentShape.pointList;
/// starts at first point
path.moveTo(
pointList[0].dx,
pointList[0].dy,
);
/// goes through every point of the line, (starts at 1)
for (int f = 1; f < pointList.length; f++) {
path.lineTo(pointList[f].dx, pointList[f].dy);
}
/// draw the line
canvas.drawPath(path, currentShape.paint);
}
}
