debugPrintOverride property

DebugPrintCallback debugPrintOverride

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

DebugPrintCallback get debugPrintOverride => debugPrint;