setColorPrintersOptions function

void setColorPrintersOptions({
  1. bool? enable,
  2. StringSink? outSink,
  3. StringSink? errSink,
})

Sets the options for printInfo, printWarning and printError.

Parameters

enable - Whether or not the printer messages should be colorized. Defaults to true.

outSink - Output StringSink for non-erroneous messages. Defaults to stdout.

outSink - Output StringSink for non-erroneous messages. Defaults to stderr.

Implementation

void setColorPrintersOptions({
  bool? enable,
  StringSink? outSink,
  StringSink? errSink,
}) {
  if (null != enable) {
    _shouldColorize = enable;
  }

  if (null != outSink) {
    _outSink = outSink;
  }

  if (null != errSink) {
    _errSink = errSink;
  }
}