buildHitTestPath method

Path buildHitTestPath(
  1. List<Rect> rects
)

Builds a hit test path from rectangle bounds.

Useful for debug visualization of hit test areas. Override to customize how hit test rectangles are combined into a path.

Implementation

Path buildHitTestPath(List<Rect> rects) {
  if (rects.isEmpty) return Path();

  final path = Path();
  for (final rect in rects) {
    path.addRect(rect);
  }
  return path;
}