pubCacheDir property

String get pubCacheDir

gets the pub cache directory

Implementation

static String get pubCacheDir {
  String? cacheDir = Platform.environment['PUB_CACHE'];
  if (cacheDir == null) {
    if (Platform.isWindows) {
      cacheDir =
          path.join(Platform.environment['LOCALAPPDATA']!, 'Pub', 'Cache');
    } else {
      cacheDir = path.join(Platform.environment['HOME']!, '.pub-cache');
    }
  }
  return cacheDir;
}