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

outdated

A package for automatically downloading and storing files

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
10
pub points
18%
popularity

Publisher

unverified uploader

A package for automatically downloading and storing files

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, shared_preferences

More

Packages that depend on download_manager