addDependencies method

Future<bool> addDependencies(
  1. String projectPath,
  2. List<String> packages, {
  3. bool isDev = false,
})

Add multiple dependencies to a project

Implementation

Future<bool> addDependencies(
  String projectPath,
  List<String> packages, {
  bool isDev = false,
}) async {
  for (final String package in packages) {
    if (!await addDependency(projectPath, package, isDev: isDev)) {
      warn('Failed to add: $package');
      // Continue with other packages
    }
  }
  return true;
}