Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 07c0d02

Browse files
committed
[Fix] Fix chip debug outline paint error.
1 parent bbb259f commit 07c0d02

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Runtime/material/chip.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,8 +2469,7 @@ public override void paint(PaintingContext context, Offset offset) {
24692469
const bool _debugShowTapTargetOutlines = false;
24702470

24712471
public override void debugPaint(PaintingContext context, Offset offset) {
2472-
D.assert(!_debugShowTapTargetOutlines);
2473-
D.assert(() => {
2472+
bool visualizeTapTargets() {
24742473
Paint outlinePaint = new Paint();
24752474
outlinePaint.color = new Color(0xff800000);
24762475
outlinePaint.strokeWidth = 1.0f;
@@ -2482,7 +2481,9 @@ public override void debugPaint(PaintingContext context, Offset offset) {
24822481
outlinePaint.color = new Color(0xff008000);
24832482
context.canvas.drawRect(this.pressRect.shift(offset), outlinePaint);
24842483
return true;
2485-
});
2484+
}
2485+
2486+
D.assert(!_debugShowTapTargetOutlines || visualizeTapTargets());
24862487
}
24872488

24882489
protected override bool hitTestSelf(Offset position) {

0 commit comments

Comments
 (0)