PubCommand constructor

PubCommand({
  1. required PubspecLock pubspecLock,
  2. required PubspecYaml pubspecYaml,
  3. required FindFile findFile,
  4. required FileSystem fs,
  5. required Logger logger,
  6. required Bindings bindings,
})

Implementation

PubCommand({
  required PubspecLock pubspecLock,
  required PubspecYaml pubspecYaml,
  required FindFile findFile,
  required FileSystem fs,
  required Logger logger,
  required Bindings bindings,
}) {
  addSubcommand(
    PubGetCommand(
      pubspecLock: pubspecLock,
      pubspecYaml: pubspecYaml,
      findFile: findFile,
      fs: fs,
      logger: logger,
      bindings: bindings,
    ),
  );
  addSubcommand(
    PubUpgradeCommand(
      pubspecLock: pubspecLock,
      pubspecYaml: pubspecYaml,
      findFile: findFile,
      fs: fs,
      logger: logger,
      bindings: bindings,
    ),
  );
  addSubcommand(
    PubDepsCommand(
      pubspecLock: pubspecLock,
      pubspecYaml: pubspecYaml,
      findFile: findFile,
      fs: fs,
      logger: logger,
      bindings: bindings,
    ),
  );
  addSubcommand(
    PubDowngradeCommand(
      pubspecLock: pubspecLock,
      pubspecYaml: pubspecYaml,
      findFile: findFile,
      fs: fs,
      logger: logger,
      bindings: bindings,
    ),
  );
  addSubcommand(
    PubConstrainCommand(
      pubspecLock: pubspecLock,
      pubspecYaml: pubspecYaml,
      findFile: findFile,
      fs: fs,
      logger: logger,
      bindings: bindings,
      constrainPubspecVersions: ConstrainPubspecVersions(
        fs: fs,
        logger: logger,
      ),
    ),
  );
}