clipRRectAndPaint method Null safety

void clipRRectAndPaint(
  1. RRect rrect,
  2. Clip clipBehavior,
  3. Rect bounds,
  4. VoidCallback painter
)

Clip canvas with Path according to rrect and then paint. canvas is restored to the pre-clip status afterwards.

bounds is the saveLayer bounds used for Clip.antiAliasWithSaveLayer.

Implementation

void clipRRectAndPaint(RRect rrect, Clip clipBehavior, Rect bounds, VoidCallback painter) {
  _clipAndPaint((bool doAntiAlias) => canvas.clipRRect(rrect, doAntiAlias: doAntiAlias), clipBehavior, bounds, painter);
}