downgradeAsync static method

Future downgradeAsync({
  1. RunOptions? runOptions,
  2. String? workingDirectory,
})

Run pub downgrade on the current project.

Implementation

static Future downgradeAsync(
    {RunOptions? runOptions, String? workingDirectory}) {
  runOptions = mergeWorkingDirectory(workingDirectory, runOptions);
  return runlib
      .runAsync(sdkBin('dart'),
          arguments: ['pub', 'downgrade'], runOptions: runOptions)
      .then((_) => null);
}