Skip to content

image_picker add picture limit to getMultiImage #85772

Description

@vytautas-pranskunas-

Hi,

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

Activity

  1. MFrankestien commented on Jul 3, 2021

    @MFrankestien

    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?

  2. vytautas-pranskunas- commented on Jul 3, 2021

    @vytautas-pranskunas-
    Author

    At one time. When I open image picker it would be good to allow user select max upto N photos.

  3. darshankawar commented on Jul 5, 2021

    @darshankawar
    Member

    plugin version https://pub.dev/packages/image_picker/changelog#0812 added multi-image selection feature.

    Screenshot 2021-07-05 at 1 26 29 PM

  4. added
    c: proposalA detailed proposal for a change to Flutter
    c: new featureNothing broken; request for a new capability
    and removed
    in triagePresently being triaged by the triage team
    on Jul 5, 2021
  5. vytautas-pranskunas- commented on Jul 5, 2021

    @vytautas-pranskunas-
    Author

    @darshankawar this proposal is about limit of multi-image selection. Or you just dropped comments for others? :)

  6. added
    P3Issues that are less important to the Flutter project
    on Jul 8, 2021
  7. ydag commented on Jul 21, 2021

    @ydag

    Hi @vytautas-pranskunas-,

    We can have this feature for iOS but it seems there is no way to do it for Android. We are using EXTRA_ALLOW_MULTIPLE to 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.

  8. mvanbeusekom commented on Jul 27, 2021

    @mvanbeusekom

    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.

  9. 18 remaining items

  10. stuartmorgan-g commented on Jan 2, 2024

    @stuartmorgan-g
    Contributor

    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.

  11. lesliearkorful commented on Jan 15, 2024

    @lesliearkorful

    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-items

    They also provided solution for backward compatibility
    https://developer.android.com/training/data-storage/shared/photopicker#device-availability

  12. stuartmorgan-g commented on Jan 16, 2024

    @stuartmorgan-g
    Contributor

    I 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).

  13. ihijazi commented on Mar 20, 2024

    @ihijazi
  14. Sun3 commented on Mar 22, 2024

    @Sun3
  15. ihijazi commented on Mar 23, 2024

    @ihijazi
  16. stuartmorgan-g commented on Mar 23, 2024

    @stuartmorgan-g
  17. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 8, 2024
  18. wuweijian1997 commented on Apr 19, 2024

    @wuweijian1997

    @darshankawar pickMultiImage not work in android

  19. darshankawar commented on Apr 19, 2024

    @darshankawar
    Member

    @wuweijian1997 Please file a new issue using issue template and provide relevant details so that we can address it properly.

  20. github-actions commented on May 3, 2024

    @github-actions

    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 -v and a minimal reproduction of the issue.

  21. locked as resolved and limited conversation to collaborators on May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: image_pickerThe Image Picker plugin.packageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions