Commit dd2bde19 authored by Devon Carew's avatar Devon Carew

add a service extension for repaint rainbow (#3409)

* add a service extension for repaint rainbow

* review comments
parent 6dc440bd
......@@ -41,10 +41,11 @@ abstract class Renderer extends Object with Scheduler, Services
@override
void initServiceExtensions() {
super.initServiceExtensions();
assert(() {
// this service extension only works in checked mode
registerBoolServiceExtension(
name: 'debugPaint',
name: 'debugPaint',
getter: () => debugPaintSizeEnabled,
setter: (bool value) {
if (debugPaintSizeEnabled == value)
......@@ -60,8 +61,19 @@ abstract class Renderer extends Object with Scheduler, Services
);
return true;
});
}
assert(() {
// this service extension only works in checked mode
registerBoolServiceExtension(
name: 'repaintRainbow',
getter: () => debugRepaintRainbowEnabled,
setter: (bool value) {
debugRepaintRainbowEnabled = value;
}
);
return true;
});
}
void initRenderView() {
if (renderView == null) {
......
......@@ -214,7 +214,7 @@ class _AnsiStatus extends Status {
_AnsiStatus(this.message) {
stopwatch = new Stopwatch()..start();
stdout.write('${message.padRight(50)} ');
stdout.write('${message.padRight(51)} ');
stdout.write('${_progress[0]}');
timer = new Timer.periodic(new Duration(milliseconds: 100), _callback);
......
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