Unverified Commit e80c699c authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Keep the debug repaint rainbow color within a valid range (#19355)

Fixes https://github.com/flutter/flutter/issues/18971
parent 99457c92
...@@ -200,7 +200,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox> ...@@ -200,7 +200,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
scene.dispose(); scene.dispose();
assert(() { assert(() {
if (debugRepaintRainbowEnabled || debugRepaintTextRainbowEnabled) if (debugRepaintRainbowEnabled || debugRepaintTextRainbowEnabled)
debugCurrentRepaintColor = debugCurrentRepaintColor.withHue(debugCurrentRepaintColor.hue + 2.0); debugCurrentRepaintColor = debugCurrentRepaintColor.withHue((debugCurrentRepaintColor.hue + 2.0) % 360.0);
return true; return true;
}()); }());
} finally { } finally {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment