getDownloadFileLocation function
Implementation
Future<File> getDownloadFileLocation(
String release, String appName, String extension) async {
final downloadDir = await getDownloadsDirectory();
if (downloadDir == null) {
throw Exception('Unable to get downloads directory');
}
final filePath = p.join(
downloadDir.absolute.path,
'$appName-$release.$extension',
);
return File(filePath);
}