deleteExceedSizeFile method
Deletes the file if it exceeds the expected segment size.
Used to handle cases where network issues cause oversized downloads.
Implementation
Future<void> deleteExceedSizeFile(DownloadTask task) async {
String cachePath = await FileExt.createCachePath(task.uri.generateMd5);
File file = File('$cachePath/${task.saveFileName}');
if (await file.exists()) await file.delete();
}