warn method

void warn(
  1. String? message, {
  2. String tag = 'WARN',
  3. String? style(
    1. String? message
    )?,
})

Writes [tag] message to stderr in bold yellow. An empty tag writes the message alone.

Implementation

void warn(
  String? message, {
  String tag = 'WARN',
  String? Function(String? message)? style,
}) =>
    _log(
      Level.warning,
      _err,
      tag.isEmpty ? '$message' : '[$tag] $message',
      const Style(foreground256: 3, isBold: true),
      style,
    );