parseArguments method

Arguments parseArguments(
  1. List<String> arguments
)

Implementation

Arguments parseArguments(List<String> arguments) {
  final argParser = ArgParser();
  argParser.addOption('path', abbr: 'p');
  argParser.addFlag('only-direct-deps', abbr: 'd');
  final result = argParser.parse(arguments);
  final (path, onlyDirectDependencies) = ((result['path']), result['only-direct-deps'] ?? false);
  return Arguments(path, onlyDirectDependencies);
}