debugPrintOverride property

  1. @override
DebugPrintCallback get debugPrintOverride
override

The value to set debugPrint to while tests are running.

This can be used to redirect console output from the framework, or to change the behavior of debugPrint. For example, AutomatedTestWidgetsFlutterBinding uses it to make debugPrint synchronous, disabling its normal throttling behavior.

It is also used by some other parts of the test framework (e.g. WidgetTester.printToConsole) to ensure that messages from the test framework are displayed to the developer rather than logged by whatever code is overriding debugPrint.

Implementation

@override
DebugPrintCallback get debugPrintOverride => debugPrintSynchronously;