Download file from url, save to phones storage

Use https://pub.dartlang.org/packages/flutter_downloader. Don’t forget to do platform configurations.

Basically, this is how you should use the package. There is a detailed long example in the link.

final taskId = await FlutterDownloader.enqueue(
  url: 'your download link',
  savedDir: 'the path of directory where you want to save downloaded files',
  showNotification: true, // show download progress in status bar (for Android)
  openFileFromNotification: true, // click on notification to open downloaded file (for Android)
);

Edit: Some people said the package on top is to well maintained. Try this one
https://pub.dev/packages/flowder

Leave a Comment