-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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]: Document that limit
is not always supported
#147773
Comments
@hodfords-khai-mobile |
sorry for missing information |
Thanks for the update. I was able to replicate the reported behavior using image_picker plugin example running with latest stable and plugin version and upon adding a limit as below, but I was able to select more than 2 images which were displayed on screen.
stable, master flutter doctor -v
|
On Android, you need to set ImagePickerAndroid's useAndroidPhotoPicker to true for the import 'package:image_picker_android/image_picker_android.dart';
import 'package:image_picker_platform_interface/image_picker_platform_interface.dart';
// ···
final ImagePickerPlatform imagePickerImplementation =
ImagePickerPlatform.instance;
if (imagePickerImplementation is ImagePickerAndroid) {
imagePickerImplementation.useAndroidPhotoPicker = true;
} I cannot reproduce this issue on iOS. Please check whether the version of |
set ImagePickerAndroid's useAndroidPhotoPicker to true solved problem in android, also check again ios with image_picker_ios 0.8.10 also works. Thanks a lot. But I found that it doesn't work on android 10 (API 29), is there any limitation |
@hodfords-khai-mobile Only when the API is Related document: https://developer.android.google.cn/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia |
@LinXunFeng thank you for taking your time solving this problem. All clear. cc @darshankawar |
limit
is not always supported
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 |
Steps to reproduce
implement pickMultipleImage with limit 2.
I've tested on Pixel 7 - API 34, iPhone15 - iOS17, iPhone12 Pro max - iOS17.4.1
Expected results
can only choose a maximum of 2 images
Actual results
can choose more than 2 images (no limit)
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
The text was updated successfully, but these errors were encountered: