directPrint method
Prints the contents to the console.
defaults to Stdout.writeln.
Implementation
void directPrint(dynamic contents, {void Function(String contents)? logger}) {
logger ??= stdout.writeln;
final buf = convert(contents);
final lines = LineSplitter().convert(buf.toString());
for (var l in lines) {
logger!(l);
}
}