paintBounds static method
Paint debug bounds for a widget
Implementation
static void paintBounds(Canvas canvas, Rect bounds, Color color) {
if (_showSugarWidgetBounds) {
final paint = Paint()
..color = color.withValues(alpha: 0.3)
..style = PaintingStyle.stroke
..strokeWidth = 1.0;
canvas.drawRect(bounds, paint);
// Paint center point
canvas.drawCircle(
bounds.center,
2.0,
Paint()..color = color,
);
}
}