downloadable 0.1.0 copy "downloadable: ^0.1.0" to clipboard
downloadable: ^0.1.0 copied to clipboard

outdated

downloadables

downloadable #

Downloadable is a file that might be in internal storage or still not downloaded.

how to crate a downloadable

var downloadable = Downloadable(
  downloadLink: 'www.example.com/files/downloadable.file',
  fileAddress: tempFolder + '/files/downloadable.file',
); 

check if its downloaded


var downloaded = await downloadable.downloaded;

start a download

if(
!downloaded){

var onDownloadComplete = (){
    print('download complete!');  
  };
  
  var progressStream = downloadable.download(onDownloadComplete);
  
  progressStream.listen((p){
    print('${p*100}%...');
  });
  
}

Cancel a download

downloadable.cancel();
1
likes
30
pub points
20%
popularity

Publisher

unverified uploader

downloadables

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

dio

More

Packages that depend on downloadable