clearCache static method

Future clearCache(
  1. VoidCallback callback
)

Implementation

static Future clearCache(VoidCallback callback) async {
  Directory tempDir = await getTemporaryDirectory();
  if (await tempDir.exists()) {
    //删除缓存目录
    await _delDir(tempDir);
  }
  callback();
  CsxKitShare.instance.toast('清除缓存成功');
}