DCli provides a number of methods to display information to a user:
print
Dart provides the built in function 'print' which prints a line of text including a new line.
1
print('hello world');
Copied!
printerr
The standard Dart 'print' function prints to stdout, DCli's 'printerr' function is identical except that it prints to stderr.
1
printerr('something bad happened.');
Copied!
You should use printerr when you are printing error messages.
echo
The echo function is provided to supplement the Dart print method. The 'echo' allows you to control whether a new line is output after the text. By default echo will NOT output a newline.