Repository navigation
image_picker add picture limit to getMultiImage #85772
Description
Activity
Can you give more explanation?
Do you want to limit the number of photos at one time, or limit the number of photos that he can choose in the long run?At one time. When I open image picker it would be good to allow user select max upto N photos.
- addedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Jul 5, 2021 plugin version https://pub.dev/packages/image_picker/changelog#0812 added multi-image selection feature.
- addedp: image_pickerThe Image Picker plugin.The Image Picker plugin.c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityand removedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Jul 5, 2021 @darshankawar this proposal is about limit of multi-image selection. Or you just dropped comments for others? :)
- addedP3Issues that are less important to the Flutter projectIssues that are less important to the Flutter project
on Jul 8, 2021 We can have this feature for iOS but it seems there is no way to do it for Android. We are using
EXTRA_ALLOW_MULTIPLEto fetch multiple images on Android and as it is stated in here it is not possible with the current implementation. If someone knows another way to handle please let us know. We would be happy to work on this.But for the moment, since the support is only limited to iOS I will discuss within the team if we want to implement it for iOS only.
As mentioned by @ydag, this functionality is only supported on iOS and won't work on other platforms (Android and Web). So we are wondering if this will still add value if it is only supported on iOS.
We can imagine that it will give a bit better user experience on iOS were users are simply not able to select more than the maximum amount of images. But this means developers should still handle the other platforms in their own logic (e.g. show the user a warning when more than the maximum amount of images are selected).
If you would like this feature to be implemented with support for iOS only please leave a 👍 on this comment. When we generate enough feedback we will provide the necessary implementation.
Reacted by Kon Gaspar, Tobias Bentin, Bharat Sundal, Nwachi ifeanyichukwu Victor , Alessandro Toschi, Egor Korshun, superwebarmy, Trindade15, Arkar Min, Nile Kelly and 6 more18 remaining items
I think Image_picker should return and error if the platform or device don't have support for the feature
The pattern we use for things like this is generally https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#api-support-queries, not erroring out.
I get that an old Android limitation was stalling this PR.
But there's a solution now in the Android docs. Is it not enough?
https://developer.android.com/training/data-storage/shared/photopicker#select-multiple-itemsThey also provided solution for backward compatibility
https://developer.android.com/training/data-storage/shared/photopicker#device-availabilityI get that an old Android limitation was stalling this PR.
There's no PR here, only a feature request. Anyone interested in implementing this is welcome to submit a PR (which has been the case since this comment).
stuartmorgan-g commented
on Mar 23, 2024 on Mar 23, 2024 · Hidden as off-topicshow commentMore actions- added a commit that references this issue
on Apr 7, 2024 - addedr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
on Apr 8, 2024 - added a commit that references this issue
on Apr 16, 2024 @darshankawar pickMultiImage not work in android
@wuweijian1997 Please file a new issue using issue template and provide relevant details so that we can address it properly.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on May 3, 2024

Hi,
It would be great to have ability to set limit on amount of pictures that can be selected. e.g. maxPictures: 3