flutter_saver 2.0.0
flutter_saver: ^2.0.0 copied to clipboard
A Flutter package for saving images and downloadable links across all platforms with support for various formats.
2.0.0 #
Breaking change — full API redesign. See the Migration Guide in README.md.
New features #
- Unified
FlutterSaver.saveFile(bytes, fileName, directory)— replaces all per-platformsaveImage*methods. - Unified
FlutterSaver.downloadFile(link, fileName, directory)— replaces all per-platformsaveNetworkFile*methods. - New
SaveDirectoryenum (downloads, pictures, movies, dcim, documents, music, podcasts, ringtones, alarms, notifications, screenshots, audiobooks) used by both methods instead of separateAndroidDirectory/DirectoryType/MacDirectoryTypeenums. - New
SaveResultreturn type:{ success, filePath, error }— richer than the previousboolreturn. - Platform detection is now fully internal — consumers never branch on platform.
- Full MIME → extension map (images, video, audio, documents) for automatic extension inference on network downloads.
- Android: native Kotlin plugin (
FlutterSaverPlugin.kt) resolves realEnvironment.DIRECTORY_*paths without external dependencies. - iOS: native Swift plugin saves to named sub-folders inside the app sandbox.
- macOS: native Swift plugin resolves real system directories via
FileManager.SearchPathDirectory. - Windows / Web: pure-Dart implementations (unchanged architecture, new API).
- Removed dependencies:
native_android_path,external_path_ios_mac. Path logic is now built into the plugin's native code. - Added
kotlin.incremental=falsetoandroid/gradle.propertiesto fix cross-drive build failures on Windows (Pub Cache on C:, project on another drive).
Breaking changes #
| Old method | New method |
|---|---|
saveImageAndroid(...) |
FlutterSaver.saveFile(...) |
saveImageIos(...) |
FlutterSaver.saveFile(...) |
saveImageMacOs(...) |
FlutterSaver.saveFile(...) |
saveImageWindowsWeb(...) |
FlutterSaver.saveFile(...) |
saveNetworkFileAndroid(...) |
FlutterSaver.downloadFile(...) |
saveNetworkFileIos(...) |
FlutterSaver.downloadFile(...) |
saveNetworkFileMac(...) |
FlutterSaver.downloadFile(...) |
saveNetworkFileWindowsWeb(...) |
FlutterSaver.downloadFile(...) |
AndroidDirectory.* |
SaveDirectory.* |
DirectoryType.* |
SaveDirectory.* |
MacDirectoryType.* |
SaveDirectory.* |
Return type: bool |
Return type: SaveResult |
Build compatibility #
- Requires Flutter ≥ 3.44.0 (AGP 9 support).
- Gradle plugin
build.gradle.ktsnow uses conditionalapply(plugin = ...)for KGP to remain compatible with both AGP 8 and AGP 9.
1.0.1 #
- Fix bug gradle
1.0.0 #
- Major stable release
- Add HTTP download support via
httppackage - Update
path_provider_masterto^1.0.0— fixes critical path resolution errors - Update
native_android_pathto^1.0.0— fixes Android path errors - Update
external_path_ios_macto^0.0.8— fixes iOS/macOS path errors
0.0.7 #
- Replace
path_providerwithpath_provider_master - Update downloads directory calls to
PathProviderMaster
0.0.6 #
- Update SDK
0.0.5 #
- Fix bug
0.0.4 #
- Fix pub points
- Update SDK
0.0.3 #
- Fix pub points
- Update SDK
0.0.2 #
- Fix pub points
- Update SDK
0.0.1+7 #
- Fix pub points
0.0.1+6 #
- Update package
0.0.1+5 #
- Fix bug
0.0.1+4 #
- Refactor code
- Add audio & video formats to download file
0.0.1+3 #
- Fix bug
0.0.1+2 #
- Fix permission bug
0.0.1+1 #
- Fix platform support bug
- Add example file
- Fix pub points
0.0.1 #
- Initial release