debugPrint top-level property

DebugPrintCallback debugPrint
getter/setter pair

Prints a message to the console, which you can access using the "flutter" tool's "logs" command ("flutter logs").

The debugPrint function logs to console even in release mode. As per convention, calls to debugPrint should be within a debug mode check or an assert:

if (kDebugMode) {
  debugPrint('A useful message');

See also:


DebugPrintCallback debugPrint = debugPrintThrottled;