getTotalCacheSize static method

Future<int> getTotalCacheSize()

Get total cache size in bytes.

Implementation

static Future<int> getTotalCacheSize() async {
  final dir = Directory(await getCacheDir());
  if (!dir.existsSync()) return 0;

  return _computeDirectorySize(dir);
}