download method
Downloads a file from the specified url to a temporary location with automatic retries.
The url can be either a String or a Uri object.
Returns the path to the downloaded file.
Implementation
Future<String> download(
Object url,
String fileName, {
Map<String, String>? headers,
void Function(int bytesReceived, int totalBytes)? onProgress,
}) async {
return _retry(() => _client.download(
url,
fileName,
headers: headers,
onProgress: onProgress,
));
}