removePackageFromCache static method
Implementation
@visibleForTesting
static Future<bool> removePackageFromCache(
String packageName, String version) async {
try {
final directory = Directory(getPackagePathInCache(packageName, version));
if (!await directory.exists()) {
return true;
}
await directory.delete();
} catch (error) {
return false;
}
return true;
}