debugPaint method
void
debugPaint(
- Context context
)
override
Implementation
@override
void debugPaint(Context context) {
super.debugPaint(context);
if (children.isEmpty) {
return;
}
final resolvedPadding = padding.resolve(Directionality.of(context));
context.canvas
..setFillColor(PdfColors.lime)
..moveTo(box!.left, box!.bottom)
..lineTo(box!.right, box!.bottom)
..lineTo(box!.right, box!.top)
..lineTo(box!.left, box!.top)
..moveTo(box!.left + resolvedPadding.left,
box!.bottom + resolvedPadding.bottom)
..lineTo(box!.left + resolvedPadding.left, box!.top - resolvedPadding.top)
..lineTo(
box!.right - resolvedPadding.right, box!.top - resolvedPadding.top)
..lineTo(box!.right - resolvedPadding.right,
box!.bottom + resolvedPadding.bottom)
..fillPath();
for (var c = 1; c < crossAxisCount; c++) {
switch (direction) {
case Axis.vertical:
context.canvas
..drawRect(
box!.left +
resolvedPadding.left +
(_context.childCrossAxis! + crossAxisSpacing) * c -
crossAxisSpacing,
box!.bottom + resolvedPadding.bottom,
math.max(crossAxisSpacing, 1),
box!.height - resolvedPadding.vertical)
..fillPath();
break;
case Axis.horizontal:
context.canvas
..drawRect(
box!.left + resolvedPadding.left,
box!.bottom +
resolvedPadding.bottom +
(_context.childCrossAxis! + crossAxisSpacing) * c -
crossAxisSpacing,
box!.width - resolvedPadding.horizontal,
math.max(crossAxisSpacing, 1))
..fillPath();
break;
}
}
for (var c = 1; c < _mainAxisCount!; c++) {
switch (direction) {
case Axis.vertical:
context.canvas
..drawRect(
box!.left + resolvedPadding.left,
box!.bottom +
resolvedPadding.bottom +
(_context.childMainAxis! + mainAxisSpacing) * c -
mainAxisSpacing,
box!.width - resolvedPadding.horizontal,
math.max(mainAxisSpacing, 1))
..fillPath();
break;
case Axis.horizontal:
context.canvas
..drawRect(
box!.left +
resolvedPadding.left +
(_context.childMainAxis! + mainAxisSpacing) * c -
mainAxisSpacing,
box!.bottom + resolvedPadding.bottom,
math.max(mainAxisSpacing, 1),
box!.height - resolvedPadding.vertical)
..fillPath();
break;
}
}
}