containsPackage static method

bool containsPackage(
  1. String package, [
  2. bool isDev = false
])

Implementation

static bool containsPackage(String package, [bool isDev = false]) {
  var dependencies = isDev ? pubSpec.devDependencies : pubSpec.dependencies;
  return dependencies.containsKey(package.trim());
}