drawBorder method

  1. @override
void drawBorder(
  1. Canvas canvas,
  2. Rect rect
)
override

Implementation

@override
void drawBorder(Canvas canvas, Rect rect) {
  if (this.borderWidth > 0) {
    borderPaint.color = this.borderColor;
    borderPaint.strokeWidth = this.borderWidth;
    canvas.drawCircle(
        rect.center,
        min((rect.width - borderWidth) / 2.0,
            (rect.height - borderWidth) / 2.0),
        borderPaint);
  }
}