fix: use default location of Flutter's '.pub_cache' folder

This commit is contained in:
Aleksey Kulikov 2022-12-24 18:35:10 +03:00
parent 34d492a9b6
commit 057fb13796
2 changed files with 2 additions and 4 deletions

View file

@ -74,9 +74,7 @@ String? _resolveLibPath(String name) {
// If lib is in Flutter's '.pub_cache' folder.
final env = Platform.environment;
if (env.containsKey('FLUTTER_ROOT')) {
final flutterPubCache =
PubCache(Directory(path.join(env['FLUTTER_ROOT']!, '.pub-cache')));
libPath = checkCache(flutterPubCache);
libPath = checkCache(PubCache());
if (_doesFileExist(libPath)) return libPath;
}