download
1.0.1, released 2 years ago by pwa.ir
Cross-platform file downloader for Dart and Flutter projects.
What it does
Downloads files across Android, iOS, web, Windows, macOS, and Linux from streams or URLs. On the web, it caches contents in a Blob and saves to the browser's default location, while on desktop and mobile it saves to absolute or relative paths.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a cross-platform file downloading mechanism for Flutter or Dart.
- You are downloading data as a stream or via HTTP response streams.
Skip it when
- You are targeting older browsers like IE or Edge prior to version 18, or Safari prior to version 10.1.
- You haven't handled required runtime permissions on mobile platforms.
Strengths
- Supports a wide range of platforms including mobile, desktop, and web.
- Simple API accepting streams or data inputs.
Weaknesses
- Requires manual permission handling on mobile platforms.
- Not supported on older versions of certain browsers.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
On mobile, you should ask/ensure the app has the required permissions to save files.
final stream = Stream.fromIterable('Hello World!'.codeUnits);
download(stream, 'hello.txt');Alternatives
Packages that do the same job and could replace download.
- background_downloader
Multi-platform background file downloading and uploading for Flutter.
92Compare - cross_file
An abstraction to allow working with files across multiple platforms.
90Compare - excel_community
Community fork of the excel library to read, create, and edit XLSX and XLS files.
82Compare - flutter_download_manager
Cross-platform file downloader supporting parallel, batch, and resumable downloads.
50Compare