According to those SO questions: UIImagePickerController not asking for permission and No permission to pick a photo from the photo library
If you want to select one image on iOS, you don't have to ask for permission to do it as the app doesn't actually access the gallery.
However, I can't find a way of doing it Flutter. Packages like ImagePicker always ask for permission.
Has anyone succeeded in picking an image in Flutter on iOS without asking for permission?
This tutorial introduces you to image_picker package in Flutter. Image picker can be used to pick an image from the gallery of the phone. Add the image_picker package to pubspec.yaml as shown above. Run flutter pub get to install the package.
Image picker can be used to pick image from gallery as well as camera. _getFromGallery () is our function picking the image from gallery. When the function is run for the first time in iOS, a gallery access permission pops up with the NSPhotoLibraryUsageDescription, you gave on Info.plist.
We no need any setup for Android in Flutter. Example code to pick Image from the Gallery and Camera. ? Text ('No image selected.') The Android operating system sometimes very rarely kills the MainActivity after the image picking finishes. This will cause lost data selected from the image picker.
If you want to share the photos are images that you attract more with your friends you need to pick the image from your mobile to share and nowadays selfie is trending taking a selfie and sharing it with your friends for this purpose you need a flutter image picker. Follow the below steps to create image picker functionality in Flutter.
From Apple documentation:
PHPickerViewController is a new picker that replaces UIImagePickerController. Its user interface matches that of the Photos app, supports search and multiple selection of photos and videos, and provides fluid zooming of content. Because the system manages its life cycle in a separate process, it’s private by default. The user doesn’t need to explicitly authorize your app to select photos, which results in a simpler and more streamlined user experience.
This library uses PHPickerViewController
as seen here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With