file_saver
0.7.0, released 6 weeks ago by hassanansari.dev
Save files from bytes, paths, streams, and URLs across Android, iOS, Web, Windows, macOS, and Linux.
What it does
Saves files from bytes, file paths, streams, or network URLs across multiple platforms. Offers methods like saveFile, saveAs, saveToGallery, saveToDownloads, and stream-based downloads.
AI-written summary of version 0.7.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to download or save files from bytes, paths, or URLs on mobile, desktop, or web.
- You want to trigger save dialogs or save directly to shared folders like Downloads or the photo gallery.
Skip it when
- You only need to pick files rather than save them.
- You require complex file management operations beyond saving/downloading.
Strengths
- Cross-platform support for Android, iOS, Web, Windows, macOS, and Linux.
- Supports multiple input types including bytes, files, paths, streams, and HTTP links.
Weaknesses
- Web platform has limitations with large files and the File System Access API depending on the browser.
- Requires platform-specific configuration for permissions and entitlements on iOS and macOS.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 5
Requires platform-specific settings like Info.plist keys for iOS and entitlement configurations for macOS.
await FileSaver.instance.saveFile(
name: "my_document",
bytes: fileBytes,
fileExtension: "pdf",
mimeType: MimeType.pdf,
);Alternatives
Packages that do the same job and could replace file_saver.
- 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 - file_picker
Use the native file explorer to pick single or multiple files, directories, and save files.
93Compare - file_saver_ffi
Save any file type to device storage, gallery, or a user‑chosen folder with progress and conflict handling.
76Compare
Works with
Packages commonly used together with file_saver: ones it builds on, ones built on it, and its own family.
- webfile_saver depends on itLightweight bindings for browser APIs via JS interop
- path_providerfile_saver depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- to_csvBuilt on file_saverCreate and download CSV or Excel files from lists of data with ease.