downInfo method
Implementation
Future<void> downInfo(String url, String filePath, VoidCallback onDone,
{VoidCallback? error}) async {
try {
DownloadFlow.download(
url,
DownloaderUtils(
progressCallback: (current, url) {
print("------------下载完成---${url}--------------");
},
file: File(filePath),
progress: ProgressImplementation(),
onDone: () {
onDone();
},
error: () {
error?.call();
},
deleteOnCancel: true,
));
} catch (msg) {
error?.call();
print(msg);
}
}