arcTo method Null safety

void arcTo(
  1. Rect rect,
  2. double startAngle,
  3. double sweepAngle,
  4. bool forceMoveTo

If the forceMoveTo argument is false, adds a straight line segment and an arc segment.

If the forceMoveTo argument is true, starts a new sub-path consisting of an arc segment.

In either case, the arc segment consists of the arc that follows the edge of the oval bounded by the given rectangle, from startAngle radians around the oval up to startAngle + sweepAngle radians around the oval, with zero radians being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval.

The line segment added if forceMoveTo is false starts at the current point and ends at the start of the arc.


void arcTo(Rect rect, double startAngle, double sweepAngle, bool forceMoveTo) {
  _arcTo(rect.left,, rect.right, rect.bottom, startAngle, sweepAngle, forceMoveTo);