logWithPrefix method

void logWithPrefix(
  1. String prefix,
  2. String message, {
  3. bool isError = false,
})

Log with custom prefix

Implementation

void logWithPrefix(String prefix, String message, {bool isError = false}) {
  if (!enabled) return;
  final color = isError ? _red : _cyan;
  _outputLine('$color$prefix$_reset $message');
}