terminalCommand method

void terminalCommand(
  1. String command, {
  2. String? message,
  3. LogLevel level = cli.LogLevel.info,
  4. bool newParagraph = false,
})

Terminal Command Messages Guidelines

Format:

<Imperative sentance>
  $ <Command>

Example:

Run the following command to see all projects:
 $ scloud projects list

Implementation

void terminalCommand(
  final String command, {
  final String? message,
  final cli.LogLevel level = cli.LogLevel.info,
  final bool newParagraph = false,
}) {
  if (message != null) {
    _logger.log(
      message,
      level,
      newParagraph: newParagraph,
      type: cli.TextLogType.normal,
    );
  }

  _logger.log(
    command,
    level,
    type: cli.TextLogType.command,
    newParagraph: newParagraph && message == null,
  );
}