downloadFile method
Download the file from the DownloadFileOptions
Implementation
Future<void> downloadFile({
required String downloadUrl,
required String savePath,
bool? logging,
Map<String, dynamic>? headers,
}) async {
Dio dio = Dio();
if (logging != null && logging) {
dio.interceptors.add(
PrettyDioLogger(),
);
}
await dio.download(
downloadUrl,
savePath,
options: Options(
headers: headers,
),
);
}