debugPaintSize method Null safety

  1. @protected
  2. @visibleForTesting
void debugPaintSize(
  1. PaintingContext context,
  2. Offset offset
)
protected">@protectedvisibleForTesting">@visibleForTesting

In debug mode, paints a border around this render box.

Called for every RenderBox when debugPaintSizeEnabled is true.

Implementation

@protected
@visibleForTesting
void debugPaintSize(PaintingContext context, Offset offset) {
  assert(() {
    final Paint paint = Paint()
     ..style = PaintingStyle.stroke
     ..strokeWidth = 1.0
     ..color = const Color(0xFF00FFFF);
    context.canvas.drawRect((offset & size).deflate(0.5), paint);
    return true;
  }());
}