download_manager 1.0.0 copy "download_manager: ^1.0.0" to clipboard
download_manager: ^1.0.0 copied to clipboard

outdated

A package for automatically downloading and storing files. You can use this package to pass a list of files which will be downloaded and stored, with notifications sent via a stream when a file has be [...]

download_manager #

A package for automatically downloading and storing files

Getting Started #

Creating a DownloadableFile #

The first step is to create a downloadable file. The simplest way to do this is using a SimpleDownloadableFile

E.g. you can create one with a function (returning something can be written to file)

  File testFile = File("test_file.txt");
  var downloadFile = DownloadableFileBasic(() => "Test string", testFile);

You can also, optionally, set an expiry date time to your DownloadableFileBasic class. The purpose of this is to have a file which is only downloaded if the expiry date on the file is newer than the one you've already downloaded

Downloading a file #

Insert your downloadable file into the DownloadManager

DownloadManager.instance.add(DownloadableFileBasic(() => "Test string", testBFile));

Results in the stream

expectLater(DownloadManager.instance.fileStream, emits(testBFile));
8
likes
0
pub points
19%
popularity

Publisher

unverified uploader

A package for automatically downloading and storing files. You can use this package to pass a list of files which will be downloaded and stored, with notifications sent via a stream when a file has been downloaded. You can also pass a date so that the package will only download the new file if it is newer than a perviously downloaded version.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, shared_preferences

More

Packages that depend on download_manager