path property
Path
path
this is the path which encloses the fan piece the path is !closed! thus it can be filled when rendering
Implementation
Path get path {
Path p = Path();
/// Just like drawing a donut from outer perimeter, we first move to the
/// starting point.
/// Note: if you don't move to the point first, flutter's Path will start at
/// 0,0 which is not the desired behaviour here.
p.moveTo(outerArcStart.dx, outerArcStart.dy);
/// an arc which is outer perimeter
p.arcToPoint(outerArcEnd, radius: Radius.circular(radiusEnd));
/// a straight line to inner perimeter
p.lineTo(innerArcEnd.dx, innerArcEnd.dy);
/// an arc which is the inner perimeter, clockwise: false will keep the concavity correct
p.arcToPoint(innerArcStart, radius: Radius.circular(radiusStart), clockwise: false);
/// enclose the path
p.close();
return p;
}