downloadFile function
Implementation
downloadFile(String fileName, String donwloadPath, String path) async {
String savePath = '$path/www/$fileName';
try {
Uri uri = Uri.parse(donwloadPath);
if (uri.host != "") await dio.Dio().download(donwloadPath, savePath);
//print('$fileName downloaded');
return;
} catch (e) {
//print(e);
return;
}
}