Skip to content

Commit d8e8e8c

Browse files
authored
[image_picker] Adds comment for the limit parameter (flutter#6678)
Fixes flutter/flutter#147773
1 parent decb460 commit d8e8e8c

File tree

8 files changed

+21
-2
lines changed

8 files changed

+21
-2
lines changed

packages/image_picker/image_picker/AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ Aleksandr Yurkovskiy <[email protected]>
6464
Anton Borries <[email protected]>
6565
6666
Rahul Raj <[email protected]>
67+
LinXunFeng <[email protected]>

packages/image_picker/image_picker/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.2
2+
3+
* Adds comment for the limit parameter.
4+
15
## 1.1.1
26

37
* Updates documentation to note that Android Photo Picker use is not optional on Android 13+.

packages/image_picker/image_picker/lib/image_picker.dart

+6
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ class ImagePicker {
112112
/// image types such as JPEG and on Android PNG and WebP, too. If compression is not
113113
/// supported for the image that is picked, a warning message will be logged.
114114
///
115+
/// The `limit` parameter modifies the maximum number of images that can be selected.
116+
/// This value may be ignored by platforms that cannot support it.
117+
///
115118
/// Use `requestFullMetadata` (defaults to `true`) to control how much additional
116119
/// information the plugin tries to get.
117120
/// If `requestFullMetadata` is set to `true`, the plugin tries to get the full
@@ -225,6 +228,9 @@ class ImagePicker {
225228
/// image types such as JPEG and on Android PNG and WebP, too. If compression is not
226229
/// supported for the image that is picked, a warning message will be logged.
227230
///
231+
/// The `limit` parameter modifies the maximum number of media that can be selected.
232+
/// This value may be ignored by platforms that cannot support it.
233+
///
228234
/// Use `requestFullMetadata` (defaults to `true`) to control how much additional
229235
/// information the plugin tries to get.
230236
/// If `requestFullMetadata` is set to `true`, the plugin tries to get the full

packages/image_picker/image_picker/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for selecting images from the Android and iOS image
33
library, and taking new pictures with the camera.
44
repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
6-
version: 1.1.1
6+
version: 1.1.2
77

88
environment:
99
sdk: ^3.3.0

packages/image_picker/image_picker_android/AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ Anton Borries <[email protected]>
6565
6666
Rahul Raj <[email protected]>
6767
André Sousa <[email protected]>
68+
LinXunFeng <[email protected]>

packages/image_picker/image_picker_android/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.8.12+3
2+
3+
* Update documentation to note that limit is not always supported.
4+
15
## 0.8.12+2
26

37
* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.

packages/image_picker/image_picker_android/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,8 @@ import 'package:image_picker_platform_interface/image_picker_platform_interface.
3333
}
3434
```
3535

36+
In addition, `ImagePickerAndroid.useAndroidPhotoPicker` must be set to `true` to use the `limit` functionality. It is implemented based on [`ActivityResultContract`][3], so it can only be ensured to take effect on Android 13 or above. Otherwise, it depends on whether the corresponding system app supports it.
37+
3638
[1]: https://pub.dev/packages/image_picker
3739
[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
40+
[3]: https://developer.android.google.cn/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia

packages/image_picker/image_picker_android/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: image_picker_android
22
description: Android implementation of the image_picker plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_android
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
5-
version: 0.8.12+2
5+
version: 0.8.12+3
66

77
environment:
88
sdk: ^3.4.0

0 commit comments

Comments
 (0)