angle static method
Calculates the angle between two points in radians.
point1 is the first point.
point2 is the second point.
Implementation
static double angle(Offset point1, Offset point2) {
return math.atan2(point2.dy - point1.dy, point2.dx - point1.dx);
}