Skip to content

bostrot/chunked_downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dart downloader that lets you set a custom chunk sizes for a lot faster downloads.

Features

  • custom chunk size downloads
  • stop downloads
  • pause downloads
  • resume downloads

Getting started

Add this package to your pubspec.yml:

chunked_downloader: x.x.x

Usage

You can use it like this: (note that everything is in bytes)

    var chunkedDownloader = await ChunkedDownloader(
        url: 'https://filesamples.com/samples/video/mjpeg/sample_3840x2160.mjpeg',
        savedDir: '/temp',
        fileName: 'sometestfile.mjpeg',
        chunkSize: 1024 * 1024,
        onError: (error) {},
        onProgress: (received, total, speed) {},
        onDone: (file) {})
    .start();

chunkedDownloader.pause();
chunkedDownloader.resume();
chunkedDownloader.stop();

About

Dart downloader with customizable chunk/buffer size

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages