debugPaintInlineLayoutEnabled property

bool debugPaintInlineLayoutEnabled
getter/setter pair

Debug flag to enable inline layout visualization. When true, paints debug information for line boxes, margins, padding, etc.

To enable debug painting:

import 'package:webf/rendering.dart';

// Enable debug paint
debugPaintInlineLayoutEnabled = true;

// Your WebF widget will now show debug visualizations

Debug visualizations include:

  • Green outline: Line box bounds
  • Red line: Text baseline
  • Blue outline: Text item bounds
  • Magenta outline: Inline box bounds (span, etc.)
  • Red semi-transparent fill: Left margin area
  • Green semi-transparent fill: Right margin area
  • Blue semi-transparent fill: Padding area

This is useful for debugging inline layout issues such as:

  • Margin gaps not appearing correctly
  • Text alignment problems
  • Line box height calculations
  • Padding and border rendering

Implementation

static bool debugPaintInlineLayoutEnabled = false;