download method
Implementation
Future<dynamic> download(
String path,
String savePath, {
void Function(int, int)? receiveCallback,
Map<String, dynamic>? data,
Options? options,
HandleError? showError,
}) async {
return await _do(() async {
var dio = dioUpload();
return await dio.download(
path,
savePath,
data: data,
options: options,
onReceiveProgress: (int receive, int total) {
if (receiveCallback != null) {
receiveCallback(receive, total);
}
},
);
}, showError);
}