download_task 1.0.0 download_task: ^1.0.0 copied to clipboard
Resumable http download request
Resumable HTTP download request - pause, resume, cancel, progress and error handling
Features #
- Control everything - pause, resume and cancellation
- Listen to updates - realtime progress and failure handling
- Easy to use
- Pure Dart
Getting started #
Include latest version from pub.dev to pubspec.yaml and simply run
await DownloadTask.download(url, destination);
Usage #
// initialize download request
final task = await DownloadTask.download(url, File("image.webp"));
// listen to state changes
task.events.listen((event) { ... }
// control task
task.pause();
task.resume();
task.cancel();
Example source code available at /example/download_task_example.dart
Additional information #
This package is primarly used in isolated_download_manager