printHelpMessage function Null safety

void printHelpMessage(
  1. [String? message]
)

Print help message to the console.

Implementation

void printHelpMessage([final String? message]) {
  if (message != null) {
    stderr.writeln(red.wrap('$message\n'));
  }

  final String options =
      LineSplitter.split(argumentParser.usage).map((String l) => l).join('\n');

  stdout.writeln(
    'Usage: bdl10n --$configFileArgument <local file path> '
    '<local project directory>\nOptions:\n$options',
  );
}