Returns true if the package is installed in pub-cache
bool isInstalled(String packageName) { try { return findPrimaryVersion(packageName) != null; } on core.FindException { return false; } }