Skip to content
pubscout

download_assets

4.1.0, released 11 months ago by an unverified publisher

Download files (optionally unzip) and store them locally for later use.

Unverified publisher
$ flutter pub add download_assets
Source repository

What it does

The package downloads assets from given URLs, can uncompress them using built‑in or custom delegates, and saves them to a configurable directory. It provides callbacks for progress, completion and cancellation, and supports web, mobile and desktop platforms.

AI-written summary of version 4.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to fetch large assets (images, videos, zip bundles) at runtime rather than bundling them with the app
  • You require custom decompression for formats beyond ZIP
  • You want a simple API with progress reporting and optional cancellation

Skip it when

  • You need a full‑featured caching or offline sync solution
  • You require secure/encrypted storage of sensitive data
  • You only need basic HTTP GET without file handling

Strengths

  • Built‑in support for ZIP and custom uncompress delegates
  • Cross‑platform including web support
  • Progress, start‑unzip and cancel callbacks

Weaknesses

  • Relies on dio; no built‑in retry or cache management
  • Only handles file download/unzip, not higher‑level asset management
  • Permissions required on mobile platforms

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
6

Add storage permissions for Android/iOS; initialize with downloadAssetsController.init() before use

await downloadAssetsController.init();
await downloadAssetsController.startDownload(
  assetsUrls:[AssetUrl(url:'https://example.com/file.zip')],
  onProgress:(p)=>print('Progress: $p'),
  onDone:()=>print('Done'),
);

Works with

Packages commonly used together with download_assets: ones it builds on, ones built on it, and its own family.