Make it easier to disable print throttling. (#3941)
This exposes the default throttling implementation, and an alternative non-throttling implementation, of `debugPrint`.
This commit is contained in:
@@ -339,19 +339,11 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
|
||||
|
||||
@override
|
||||
void initInstances() {
|
||||
debugPrint = _synchronousDebugPrint;
|
||||
debugPrint = debugPrintSynchronously;
|
||||
super.initInstances();
|
||||
ui.window.onBeginFrame = null;
|
||||
}
|
||||
|
||||
void _synchronousDebugPrint(String message, { int wrapWidth }) {
|
||||
if (wrapWidth != null) {
|
||||
print(message.split('\n').expand((String line) => debugWordWrap(line, wrapWidth)).join('\n'));
|
||||
} else {
|
||||
print(message);
|
||||
}
|
||||
}
|
||||
|
||||
FakeAsync _fakeAsync;
|
||||
Clock _clock;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user