donwloadFile method
Implementation
donwloadFile(BuildContext context, String url, String nama) async {
await _prepareSaveDir();
print("Downloading");
Ui.of(context).errorAlert(message: "Downloading", duration: 3);
try {
await Dio().download(url, _localPath + "/" + nama);
Ui.of(context).errorAlert(message: "Download Completed", duration: 3);
} catch (e) {
Ui.of(context).errorAlert(message: "Download Failed", duration: 3);
}
}