Keep the debug repaint rainbow color within a valid range (#19355)
Fixes https://github.com/flutter/flutter/issues/18971
This commit is contained in:
parent
99457c92d7
commit
e80c699cc9
@ -200,7 +200,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
|
||||
scene.dispose();
|
||||
assert(() {
|
||||
if (debugRepaintRainbowEnabled || debugRepaintTextRainbowEnabled)
|
||||
debugCurrentRepaintColor = debugCurrentRepaintColor.withHue(debugCurrentRepaintColor.hue + 2.0);
|
||||
debugCurrentRepaintColor = debugCurrentRepaintColor.withHue((debugCurrentRepaintColor.hue + 2.0) % 360.0);
|
||||
return true;
|
||||
}());
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user