centroid property
Offset
get
centroid
Calculates the centroid point of the arc.
Implementation
Offset get centroid {
final midAngle = (startAngle + endAngle) / 2;
final midRadius = (innerRadius + outerRadius) / 2;
return Offset(
centerX + midRadius * math.cos(midAngle),
centerY + midRadius * math.sin(midAngle),
);
}