download method
Implementation
Future<ZResponse> download(DownloadRequest request,
{OnStart? onStart,
OnProgress? onProgress}) async {
// var a = ZRequest(path: "", body : "", queryParameters: null, options : null);
dio.Response response = await dio.Dio().download(
request.path,
request.savePath,
options: request.options,
queryParameters: request.queryParameters,
onReceiveProgress: (count, total) {
// TODO speed
onProgress?.call(count, total, -1);
},
);
return ZResponse(request: request, response: response);
}