downloadFileInDownloadFolderAndroid method

Future<File?> downloadFileInDownloadFolderAndroid({
  1. required String? url,
  2. dynamic progress(
    1. String
    )?,
  3. required String filename,
  4. required String extension,
})

use to download file download folder

Implementation

Future<File?> downloadFileInDownloadFolderAndroid(
    {required String? url,
    Function(String)? progress,
    required String filename,
    required String extension}) async {
  String? android_path = "${await getDownloadFolderPath()}/";
  File? file = await downloadCustomLocation(
      url: url,
      path: android_path,
      filename: filename,
      extension: extension,
      progress: progress);
  return file;
}