搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.3

isolated_download_manager

基於可重用隔離區的檔案下載管理器,支援進度、取消、暫停和恢復

AndroidiOSmacOSWindowsLinux
近 30 天下載
262
喜歡數
28
Pub 分數
160

安裝套件

flutter pub add isolated_download_manager

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,使用隔離的 Dart 線程提供強大的檔案下載管理器,支援並行下載。它支援即時進度追蹤、取消、暫停和恢復功能,確保高效且響應迅速的下載,而不會阻塞主要 UI 線程。此套件在設計時考慮了跨平台相容性,可在 Android、iOS、macOS、Windows 和 Linux 上順暢運作。該套件利用隔離區來安全高效地處理繁重的 I/O 操作,非常適合需要可靠背景下載的應用程式。

適用情境

  • 背景檔案下載
  • 恢復中斷的下載
  • 即時下載進度追蹤
  • 多個同時下載
  • 離線內容快取

主要特色

  • 基於 Isolate 的併發
  • 暫停和恢復下載
  • 下載進度監控
  • 跨平台支援
  • 取消功能

適合對象

  • 需要後台下載的應用
  • 媒體流應用程式
  • 大檔案傳輸工具
  • 離線優先的行動應用
  • 具有多個並發下載的應用程式

使用建議

  • 需要對網路問題進行適當的錯誤處理
  • 可能需要額外的儲存權限管理
  • 性能取決於設備資源
  • 不適用於非常小或頻繁的下載
  • 在應用重啟期間需要仔細的狀態管理

原始 README

以下為關聯原始碼儲存庫的 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

所屬分類

依賴

依賴清單 2 項

  • download_task>=1.0.2 <2.0.0
  • http>=0.13.0 <2.0.0

原始碼儲存庫

使用此套件的專案

暫無相關資料。