FLUTTER ECOSYSTEM

starkdmi/download_manager

具有进度、取消、暂停和恢复功能的独立下载管理器

下载管理器 项目封面
Stars
14
Forks
2
最近推送(UTC)
2023年6月15日
项目状态
未归档
Dmitry Starkov GitHub avatar
GITHUB User

Dmitry Starkov ↗

On-device ML engineer · Apple silicon · audio, video, image · Swift, MLX, CoreML

语言Dart

技术话题

此仓库发布的插件

使用的依赖

依赖清单 4 项
  • download_task>=1.0.2 <2.0.0
  • http>=0.13.0 <2.0.0
  • lints开发依赖>=0.1.0 <3.0.0
  • test开发依赖>=1.16.0 <2.0.0

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

File download manager based on reusable isolates with progress, cancellation, pause and resume

Features

  • Fully isolated - create any amount of reusable isolates, all handled internally
  • Powerfull - pause, resume, cancel, download queue and many more
  • Listen to updates - realtime progress and failure handling
  • UI - use ready-to-use Flutter widgets (optionally via isolated_download_manager_flutter)
  • Pure Dart - only http dependency

Getting started

Include latest version from pub.dev to pubspec.yaml

Usage

// initialize
await DownloadManager.instance.init(isolates: 3);

// download
final request = DownloadManager.instance.download(url);

// listen to state changes
request.events.listen((event) { ... }

// control the task
request.pause();
request.resume();
request.cancel();

Example full source code available at example's directory

Additional information

For resumable downloads download_task package is used