可帮助开发者在 Flutter 鸿蒙版应用中轻松获取设备存储中的所有图片。核心功能为跨平台(Android、iOS)图片读取,需配置相应权限,通过简单接口即可实现图片数据获取。【此简介由AI生成】
| Files | Last commit | Last update |
|---|---|---|
| 3 years ago | ||
| 1 month ago | ||
| 3 years ago | ||
| 5 months ago | ||
| 3 years ago | ||
| 5 months ago | ||
| 3 years ago | ||
| 1 month ago | ||
| 3 years ago | ||
| 3 years ago | ||
| 3 years ago | ||
| 1 month ago | ||
| 3 years ago | ||
| 5 months ago |
本项目基于 all_gallery_images 的 main 分支开发, 仅实现HarmonyOS功能,Android端和iOS端的实现未作改动。如果在使用过程中有任何问题,可以在GitCode提Issue,会及时跟进。issue地址:issues。
All Gallery Images
本项目基于 all_gallery_images 的 main 分支开发,新增适配鸿蒙系统的相关功能,安卓及IOS版本未作改动。
Flutter plugin use to fetch all the images from the storage in Android and iOS .
Installation
First, add all_gallery_images as a dependency in your pubspec.yaml file.
iOS
Add the following keys to your Info.plist file :
NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.
<key>NSPhotoLibraryUsageDescription</key>
<string>Allow assess in order to fetch images from storage</string>
Android
Add the following permissions to your AndroidManifest.xml :
<manifest ...>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
...
<manifest/>
Example
...
StorageImages? storageImages;
try {
storageImages = await GalleryImages().getStorageImages();
} catch(error)
{
debugPrint(error.toString());
}
...
Introduction
可帮助开发者在 Flutter 鸿蒙版应用中轻松获取设备存储中的所有图片。核心功能为跨平台(Android、iOS)图片读取,需配置相应权限,通过简单接口即可实现图片数据获取。【此简介由AI生成】
Customize your domain