Flutter 下载管理器是一个跨平台包,可实现可靠的文件下载,支持中断后继续下载、并行和批量处理。它提供实时进度更新和状态通知,非常适合需要在 Android、iOS、macOS、Windows 和 Linux 上具备强大下载功能的应用程序。该包简化了高效管理多个下载的过程,同时确保数据完整性和用户反馈。
适合场景
批量文件下载
恢复中断的下载
实时进度跟踪
后台下载
大文件传输
离线内容缓存
主要特点
可恢复的下载
并行和批量下载
跨平台支持
进度和状态回调
简单的 API 集成
后台下载处理
适合对象
需要离线内容的应用程序
媒体流应用
文件管理工具
带有可下载资源的教育类应用
具有批量文件操作的企业级应用
使用建议
需要 Android 的互联网权限
后台执行可能因平台而异
大文件下载可能会影响电池续航和数据使用
下载界面的自定义选项有限
无内置下载队列优先级
可能需要特定于平台的配置
原始 README
以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。
Flutter Download Manager
|
Overview
Flutter Download Manager is a Cross-Platform file downloader with Parallel and Batch Download support. Manage download tasks by url and be notified of status and their progress. Pause, Cancel, Queue and Resume Downloads.
This package was made as I felt like there are no download managers in flutter, specially with desktop support.
Features
Manage download tasks by url
Ability to notified of status and progress changes
Partial Download Feature
Queue Downloads
Pause, Cancel or Resume Downloads
Parallel File Downloads (2 or can change)
Support Batch download
Platforms Supported
Linux
MacOS
Windows
Android
iOS
There are a few caveats about this package:
On desktop it saves the file in absolute or relative path.
On mobile it saves the file in absolute or relative path, but we should ask/ensure if the app has the required permissions.
It does not run in a background process, so when the dart application closes the manager will also shut down.