utopia_save_file
0.2.6, released 3 weeks ago by utopiasoft.io
Unified and correct implementation of file saving across platforms.
What it does
UtopiaSaveFile provides a unified API to save files across Android, iOS, macOS, and Web. It handles MIME type inference, filename extensions, and triggers platform-native save dialogs or share sheets.
AI-written summary of version 0.2.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to let users save files or documents generated by your app across multiple platforms
- You want a unified API that handles platform-specific save panels, system files apps, or share sheets
Skip it when
- You only need local background file caching without user interaction
- You are building a server-side Dart application
Strengths
- Provides a unified interface for saving files on Android, iOS, macOS, and Web
- Automatically infers MIME types and handles extension matching
- Requires no special storage permissions on Android or property list changes on iOS
Weaknesses
- Web downloads complete immediately via anchor elements even if the user cancels later
- Platform behavior varies significantly (system files app on Android, share sheet on iOS, save panel on macOS)
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
No permissions needed on Android. No special Info.plist configuration is needed on iOS.
await UtopiaSaveFile.fromBytes(
bytes,
name: 'report.pdf',
mime: 'application/pdf',
);Alternatives
Packages that do the same job and could replace utopia_save_file.
- flutter_file_dialog
Dialogs for picking and saving files and directories on Android and iOS.
90Compare - 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
Works with
Packages commonly used together with utopia_save_file: ones it builds on, ones built on it, and its own family.
- mimeutopia_save_file depends on itUtilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
- webutopia_save_file depends on itLightweight bindings for browser APIs via JS interop
- cross_fileutopia_save_file depends on itAn abstraction to allow working with files across multiple platforms.
- utopia_hooksSame familyState management solution inspired by React Hooks for local and global states.