Search packages, repositories and app categories

Package detailsv1.0.1

download

Cross-Platform file downloader for Dart and Flutter projects.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
19.1K
Likes
82
Pub points
140

Install package

flutter pub add download

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The download package provides a cross-platform file downloader for Dart and Flutter applications, enabling seamless file downloads across Android, iOS, Web, macOS, Windows, and Linux. It offers a simple API to initiate downloads, monitor progress, and handle file storage with platform-specific optimizations. Designed for reliability and ease of use, it supports background downloads and integrates smoothly into apps requiring offline content or media retrieval.

Use cases

  • Downloading files from URLs in mobile apps
  • Fetching assets for offline use
  • Supporting background downloads on all platforms
  • Integrating with media or document management features
  • Enabling app updates via downloadable bundles

Key features

  • Cross-platform compatibility
  • Progress tracking during downloads
  • Background download support
  • Simple API for integration
  • Platform-optimized file handling

Suitable for

  • Mobile and desktop Flutter apps
  • Apps needing offline content
  • Media or document-heavy applications
  • Projects requiring reliable file retrieval
  • Developers seeking minimal setup for downloads

Considerations

  • Requires proper permissions on Android and iOS
  • Web support limited by browser policies
  • Large files may require memory management
  • File path handling varies by platform
  • Background execution constraints on some platforms

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Cross-Platform file downloader for Dart and Flutter projects.

pub package

Demo

Web Demo

Features

Supports these platforms:

  • Android
  • iOS
  • Linux
  • MacOS
  • Web
  • Windows

There are a few caveats about this package:

  • On the web it caches the contents in a Blob and eventually saves the file in browser's default location.
  • 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.
  • On the web, not supported in IE or Edge (prior version 18), or in Safari (prior version 10.1).

Getting started

In your pubspec.yaml file add:

dependencies:
  download: any

Then, in your code import:

import 'package:download/download.dart';

Usage

final stream = Stream.fromIterable('Hello World!'.codeUnits);
download(stream, 'hello.txt');

or

import 'package:http/http.dart';
const url = 'http://example.com';

final stream = get(url);
download(stream, 'hello.txt');

Please refer to /example folder for a working example.

Additional information

Please feel free to contribute to the project or file an issue.

Categories

Source repository

Projects using this package