writeLevel method

void writeLevel(
  1. LogLevel level,
  2. Object message, {
  3. required Styles fg,
})

Implementation

void writeLevel(LogLevel level, Object message, {required Styles fg}) {
  // ignore: avoid_print
  if (logLevelNum[level]! > logLevelNum[this.level]!) {
    return;
  }
  if (fg == Styles.DEFAULT) {
    write(message);
    return;
  }
  write(colorize(message.toString(), fg: fg));
}