Flutter plugin use to fetch all the images from the storage in Android and iOS .
First, add all_gallery_images as a dependency in your pubspec.yaml file.
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>
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/>
...
StorageImages? storageImages;
try {
storageImages = await GalleryImages().getStorageImages();
} catch(error)
{
debugPrint(error.toString());
}
...