debugPaintSize method Null safety

  1. @protected
void debugPaintSize (
  1. PaintingContext context,
  2. Offset offset
)
@protected

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

Called for every RenderBox when debugPaintSizeEnabled is true.

Implementation

@protected
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;
  }());
}