removeUnusedDependencies abstract method

Future<void> removeUnusedDependencies(
  1. Set<String> unusedDependencies
)

Removes the specified unused dependencies from the project.

This method executes dart pub remove for each dependency in the provided unusedDependencies set.

  • unusedDependencies: A set of dependency names to be removed from pubspec.yaml.

Throws an exception if the removal process encounters errors.

Implementation

Future<void> removeUnusedDependencies(Set<String> unusedDependencies);