debugPaint method
void
debugPaint(
- Context context
)
override
Implementation
@override
void debugPaint(Context context) {
context.canvas
..setStrokeColor(PdfColors.green)
..setLineWidth(1)
..drawBox(box!);
if (child == null) {
context.canvas.strokePath();
return;
}
if (child!.box!.bottom > 0) {
final headSize = math.min(child!.box!.bottom * 0.2, 10);
context.canvas
..moveTo(
box!.left + child!.box!.horizontalCenter,
box!.bottom,
)
..lineTo(box!.left + child!.box!.horizontalCenter,
box!.bottom + child!.box!.bottom)
..lineTo(box!.left + child!.box!.horizontalCenter - headSize,
box!.bottom + child!.box!.bottom - headSize)
..moveTo(box!.left + child!.box!.horizontalCenter,
box!.bottom + child!.box!.bottom)
..lineTo(box!.left + child!.box!.horizontalCenter + headSize,
box!.bottom + child!.box!.bottom - headSize);
}
if (box!.bottom + child!.box!.top < box!.top) {
final headSize =
math.min((box!.top - child!.box!.top - box!.bottom) * 0.2, 10);
context.canvas
..moveTo(box!.left + child!.box!.horizontalCenter, box!.top)
..lineTo(box!.left + child!.box!.horizontalCenter,
box!.bottom + child!.box!.top)
..lineTo(box!.left + child!.box!.horizontalCenter - headSize,
box!.bottom + child!.box!.top + headSize)
..moveTo(box!.left + child!.box!.horizontalCenter,
box!.bottom + child!.box!.top)
..lineTo(box!.left + child!.box!.horizontalCenter + headSize,
box!.bottom + child!.box!.top + headSize);
}
if (child!.box!.left > 0) {
final headSize = math.min(child!.box!.left * 0.2, 10);
context.canvas
..moveTo(box!.left, box!.bottom + child!.box!.verticalCenter)
..lineTo(box!.left + child!.box!.left,
box!.bottom + child!.box!.verticalCenter)
..lineTo(box!.left + child!.box!.left - headSize,
box!.bottom + child!.box!.verticalCenter - headSize)
..moveTo(box!.left + child!.box!.left,
box!.bottom + child!.box!.verticalCenter)
..lineTo(box!.left + child!.box!.left - headSize,
box!.bottom + child!.box!.verticalCenter + headSize);
}
if (box!.left + child!.box!.right < box!.right) {
final headSize =
math.min((box!.right - child!.box!.right - box!.left) * 0.2, 10);
context.canvas
..moveTo(box!.right, box!.bottom + child!.box!.verticalCenter)
..lineTo(box!.left + child!.box!.right,
box!.bottom + child!.box!.verticalCenter)
..lineTo(box!.left + child!.box!.right + headSize,
box!.bottom + child!.box!.verticalCenter - headSize)
..moveTo(box!.left + child!.box!.right,
box!.bottom + child!.box!.verticalCenter)
..lineTo(box!.left + child!.box!.right + headSize,
box!.bottom + child!.box!.verticalCenter + headSize);
}
context.canvas.strokePath();
}