debugPrintSynchronously function

void debugPrintSynchronously(
  1. String? message, {
  2. int? wrapWidth,
})

Alternative implementation of debugPrint that does not throttle. Used by tests.

Implementation

void debugPrintSynchronously(String? message, {int? wrapWidth}) {
  if (message != null && wrapWidth != null) {
    print(
      message
          .split('\n')
          .expand<String>((String line) => debugWordWrap(line, wrapWidth))
          .join('\n'),
    );
  } else {
    print(message);
  }
}