https://github.com/starkdmi/resumable_download
Resumable HTTP download request - pause, resume, cancel, progress and error handling
https://github.com/starkdmi/resumable_download
dart http
Last synced: about 1 year ago
JSON representation
Resumable HTTP download request - pause, resume, cancel, progress and error handling
- Host: GitHub
- URL: https://github.com/starkdmi/resumable_download
- Owner: starkdmi
- License: bsd-3-clause
- Created: 2022-07-07T20:45:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T18:28:38.000Z (about 3 years ago)
- Last Synced: 2025-04-08T14:20:33.226Z (about 1 year ago)
- Topics: dart, http
- Language: Dart
- Homepage: https://pub.dev/packages/download_task
- Size: 144 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
**Resumable HTTP download request** - pause, resume, cancel, realtime progress and error handling
## Features
- **Take control** - pause, resume and cancel
- **Listen to updates** - realtime progress and failure handling
- **Pure Dart** - only `http` dependency
- **Easy to use** - singletone and stream
## Getting started
Include latest version from [pub.dev](https://pub.dev/packages/download_task) to `pubspec.yaml` and simply run
```dart
await DownloadTask.download(url, destination);
```
## Usage
```dart
// 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 full source code available at [example's directory](example/download_task_example.dart)
## Additional information
This package is primarly used in [isolated_download_manager](https://pub.dev/packages/isolated_download_manager)