deleteFile method

bool deleteFile({
  1. required String cachedFileName,
})

deletes the created file

Implementation

bool deleteFile({required String cachedFileName}) {
  File jsonFile;
  String _filePath = tempDirectory.path + '/$cachedFileName.json';
  jsonFile = new File(_filePath);
  // jsonFile.writeAsStringSync(json.encode({}));
  jsonFile.delete();
  return true;
}