-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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] Adds comment for the limit parameter #6678
base: main
Are you sure you want to change the base?
Conversation
@@ -112,6 +112,12 @@ class ImagePicker { | |||
/// image types such as JPEG and on Android PNG and WebP, too. If compression is not | |||
/// supported for the image that is picked, a warning message will be logged. | |||
/// | |||
/// The `limit` parameter modifies the maximum number of images that can be selected. | |||
/// On Android, you need to set ImagePickerAndroid's useAndroidPhotoPicker to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be []
around ImagePickerAndroid
, and ``
around useAndroidPhotoPicker
This also seems a little verbose, maybe shorten it to
On Android, [ImagePickerAndroid.useAndroidPhotoPicker] must be set to `true` to use the `limit` functionality
I'm not sure the see: [link]
part is necessary either.
Same for the other instance of this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review, I've readjusted it.
I guess, before this gets merged, is this a feature that isn't available in the android sdk? or is it just not implemented properly in the plugin? |
I made a reply here(flutter/flutter#147773 (comment)) and adjusted the comment. Please review again. |
/// On Android, [ImagePickerAndroid.useAndroidPhotoPicker] must be set to `true` | ||
/// to use the `limit` functionality. And it can only be ensured to take effect | ||
/// on Android 13 or above. Otherwise, it depends on whether the corresponding | ||
/// system app supports it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not generally get this specific about platform-specific details in the app-facing package:
- They tend to get outdated because they are about details that are controlled in another package.
- They don't scale well to many platforms (e.g., you haven't discussed desktop here, and specifically calling out only Android makes it seem like desktop should be fine, which isn't the case).
- They can't scale to third-party implementations.
I would much prefer we just use the same comment that we use for the platform interface layer.
This level of platform-specific detail is something we could put in the Android package's README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
d4acc38
to
7f80eaf
Compare
7f80eaf
to
5b0a880
Compare
Fixes flutter/flutter#147773
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.