getCacheSize static method

Future<String> getCacheSize()

Implementation

static Future<String> getCacheSize() async {
  final Directory tempDir = await getTemporaryDirectory();
  double size = 0.0;
  await for (final FileSystemEntity entity in tempDir.list()) {
    if (entity is File) {
      size += await entity.length();
    }
  }
  return formatMemorySize(size);
}