Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Single Image picker in Flutter on iOS without permission

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?

like image 717
Marcin Szałek Avatar asked Apr 23 '21 06:04

Marcin Szałek


People also ask

How to use image_picker in flutter?

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.

How to pick image from gallery using image picker in iOS?

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.

Do we need any setup for Android in flutter?

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.

How to share selfie with friends in flutter?

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.


1 Answers

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

like image 124
Jabbar Avatar answered Sep 20 '22 06:09

Jabbar