downloadFile function

Future<String> downloadFile(
  1. String url
)

Implementation

Future<String> downloadFile(String url) async {
  var tmp = await getTemporaryDirectory();
  LogUtils.i("downloadFile", url);
  var saveFilePath = '${tmp.path}jsbundle/index.bundle.js';
  await Dio().download(url, saveFilePath);
  return saveFilePath;
}