drawRect method

  1. @override
void drawRect(
  1. Rect rect,
  2. Paint paint
)
override

Draws a rectangle with the given Paint. Whether the rectangle is filled or stroked (or both) is controlled by Paint.style.

Implementation

@override
void drawRect(Rect rect, Paint paint) async {
  addSkeleton(rect, paint.color);
  if (paint.shader is Gradient) {
    final Color? color = await getColorFromPaint(paint);
    addSkeleton(rect, color);
  }
}