warning method

void warning(
  1. String message, {
  2. bool newParagraph = false,
  3. String? hint,
})

Warning Messages Guidelines

Use if the CLI can continue to run but the user should still be warned that something went wrong or is not as expected. Ensure to always provide actionable guidance on how to resolve the issue.

Format:

WARNING: <Short description>
<Actionable suggestion/hint>

Implementation

void warning(
  final String message, {
  final bool newParagraph = false,
  final String? hint,
}) {
  _logger.warning(
    message,
    newParagraph: newParagraph,
  );

  if (hint != null) {
    _logger.info(
      hint,
      type: cli.TextLogType.hint,
    );
  }
}