drawArc method Null safety

void drawArc(
  1. Rect rect,
  2. double startAngle,
  3. double sweepAngle,
  4. bool useCenter,
  5. Paint paint

Draw an arc scaled to fit inside the given rectangle.

It starts 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. If useCenter is true, the arc is closed back to the center, forming a circle sector. Otherwise, the arc is not closed, forming a circle segment.

This method is optimized for drawing arcs and should be faster than Path.arcTo.


void drawArc(Rect rect, double startAngle, double sweepAngle, bool useCenter, Paint paint) {
  assert(paint != null);
  _drawArc(rect.left, rect.top, rect.right, rect.bottom, startAngle,
           sweepAngle, useCenter, paint._objects, paint._data);