-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
image_picker add picture limit to getMultiImage #85772
image_picker add picture limit to getMultiImage #85772
Comments
Can you give more explanation? |
At one time. When I open image picker it would be good to allow user select max upto N photos. |
plugin version https://pub.dev/packages/image_picker/changelog#0812 added multi-image selection feature. |
@darshankawar this proposal is about limit of multi-image selection. Or you just dropped comments for others? :) |
We can have this feature for iOS but it seems there is no way to do it for Android. We are using 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. |
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 |
Re-opening based on the use case described in #116588 (comment); having a best-effort plugin cutoff even on unsupported platform would allow us to bypass steps like resampling images for those past the cutoff. We would just need to be very clear in the API docs that on some platforms the UX of this won't actually prevent users from thinking they are picking more images. |
Now also android has native support for this feature, and image_picker package already can use the Android PhotoPicker. One of the issues would be the API compatibility, I think Image_picker should return and error if the platform or device doesn't have support for the feature, so developers can rely in call getImage multiples times, or use a custom image picker, like other flutter packages implementations. |
This comment was marked as off-topic.
This comment was marked as off-topic.
is it possible to make a callback directly, the PickMultiVisualMedia(maxImage) method from native android
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Has anybody implemented this in Flutter? |
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. They also provided solution for backward compatibility |
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). |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Adds limit parameter to `MediaOptions` and `MultiImagePickerOptions`. The `limit` argument defines how many images or media files can be select. Only platform interface package changes taken from: #6201 Fixes: [flutter/flutter#85772](flutter/flutter#85772)
…Media to ios and Android (#6201) Adds limit parameter to `MediaOptions` and `MultiImagePickerOptions` and supports its use on iOS and Android. The `limit` argument defines how many images or media files can be select. Fixes: [flutter/flutter#85772](flutter/flutter#85772)
@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 |
Hi,
It would be great to have ability to set limit on amount of pictures that can be selected. e.g. maxPictures: 3
The text was updated successfully, but these errors were encountered: