v5.0.0
image_save
您可以使用此套件將影像儲存至相簿或沙盒,支援 Android 與 iOS。
29喜歡 238近 30 天下載140Pub 分數
AndroidiOS
將圖片儲存到相簿或沙盒
{"sdk":"flutter"}{"sdk":"flutter"}4.0.0以下為英文專案原文快照,最新內容請造訪 GitHub。
Save image to album, support Android and iOS.
Add the following statement in AndroidManifest.xml:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Add the following statement in Info.plist
<key>NSPhotoLibraryUsageDescription</key>
<string>Add the description of the permission you need here.</string>
See Example
// Save to album.
bool success = await ImageSave.saveImage(data, "demo.gif", albumName: "demo");
// Save to sandbox.
// Notice: Image saved in this way will be deleted when the application is uninstalled.
bool success = await ImageSave.saveImageToSandbox(data, "demo.gif");
// Get images from Sandbox.
List<Uint8List> imageDatas = await ImageSave.getImagesFromSandbox();