debugPaintSize method

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

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

Called for every RenderBox when debugPaintSizeEnabled is true.

Implementation

@override
void debugPaintSize(PaintingContext context, Offset offset) {
  super.debugPaintSize(context, offset);
  assert(() {
    Paint paint;
    if (child == null || child.size.isEmpty) {
      paint = Paint()
        ..color = const Color(0x90909090);
      context.canvas.drawRect(offset & size, paint);
    }
    return true;
  }());
}