media_gallery_saver 1.0.0
media_gallery_saver: ^1.0.0 copied to clipboard
This plug-in allows you to save files to the iOS and Android galleries.If authorization is required when saving, an authorization dialog will appear.
media_gallery_saver #
This plug-in allows you to save files to the iOS and Android galleries. If authorization is required when saving, an authorization dialog will appear.
Supported Files #
- jpg
- png
- gif
- webp
- heic
- mp4
Usage #
# pubspec.yaml
dependencies:
media_gallery_saver: ^1.0.0
iOS #
To obtain permission to save, you must set NSPhotLibraryUsageDescription
in the info.plist of the project you wish to use.
<key>NSPhotoLibraryUsageDescription</key>
<string>Why authority is needed</string>
Android #
uses-permission
is set in the internal AndroidManifest.
Example #
File file = File("Path of the file you want to save.");
MediaGallerySaver().saveMedia(
file: file,
);