saveFile method
Implementation
Future<void> saveFile(String path, Uint8List bytes) async {
try {
final file = File(path);
await file.parent.create(recursive: true);
await file.writeAsBytes(bytes);
} on FileSystemException catch (e) {
throw DownloadException('Failed to save file $path: ${e.message}');
}
}