background_downloader
9.6.6, released 2 weeks ago by bbflight.com
Multi-platform background file downloading and uploading for Flutter.
What it does
Enables robust, background file transfers (downloads and uploads) across Android, iOS, macOS, Windows, and Linux. Transfers continue running even when the app is placed in the background or terminated by the operating system, using native URLSession on Apple platforms and WorkManager/JobService on Android.
AI-written summary of version 9.6.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- Your app needs to download or upload large files in the background.
- Transfers must persist and complete even if the app is suspended, closed, or terminated by the OS.
- You require fine-grained progress tracking, notifications, pausing, and resuming for file tasks.
Skip it when
- You only need simple, short-lived foreground HTTP requests that fail if the app closes.
- You are targeting platforms without proper native background transfer support or constraints.
Strengths
- Cross-platform support for Android, iOS, macOS, Windows, and Linux.
- Resilient background operation using native platform APIs (URLSession, WorkManager).
- Provides both a high-level reactive Transfer API and low-level queue/stream methods.
Weaknesses
- Requires specific Kotlin configuration on Android and network entitlements on macOS.
- If a user forcefully swipes the app away from the app switcher, background transfers may still be terminated by the OS.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 8
Requires Kotlin 2.1.0+ for Android settings.gradle, and client network entitlements on macOS for debug and release profiles.
final task = DownloadTask(
url: 'https://example.com/large_video.mp4',
filename: 'video.mp4',
);
final transfer = await FileDownloader().transfers.start(task);
final file = await transfer.file;Alternatives
Packages that do the same job and could replace background_downloader.
- file_selector_macos
macOS implementation of the file_selector plugin
82Compare - flutter_downloader
Plugin to create and manage background download tasks on Android and iOS.
80Compare - path_provider_android
Android implementation of the path_provider plugin for finding commonly used locations.
79Compare - path_provider_foundation
iOS/macOS implementation of path_provider using direct FFI calls
78Compare
Works with
Packages commonly used together with background_downloader: ones it builds on, ones built on it, and its own family.
- mimebackground_downloader depends on itUtilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
- asyncbackground_downloader depends on itUtility classes and helpers that extend Dart's async library.
- loggingbackground_downloader depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- path_providerbackground_downloader depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- connectivity_plusbackground_downloader depends on itDiscover the state of network connectivity (WiFi, mobile, ethernet) on Android, iOS, Web and desktops.
- flutter_edge_aiBuilt on background_downloaderOn-device AI for Flutter to run Gemma and other LLMs, embeddings, and speech without a server.