isVersionCommand function

bool isVersionCommand(
  1. List<String> args
)

Check if the first argument is a version command.

Implementation

bool isVersionCommand(List<String> args) {
  if (args.isEmpty) return false;
  final first = args.first.toLowerCase();
  return first == 'version' ||
      first == '-version' ||
      first == '-v' ||
      first == '--version';
}