diff --git a/packages/image_picker/image_picker/AUTHORS b/packages/image_picker/image_picker/AUTHORS index 493a0b4ef9c2..3b9449f8d518 100644 --- a/packages/image_picker/image_picker/AUTHORS +++ b/packages/image_picker/image_picker/AUTHORS @@ -64,3 +64,4 @@ Aleksandr Yurkovskiy Anton Borries Alex Li Rahul Raj <64.rahulraj@gmail.com> +LinXunFeng diff --git a/packages/image_picker/image_picker/CHANGELOG.md b/packages/image_picker/image_picker/CHANGELOG.md index a054eea85267..29fb408f8b45 100644 --- a/packages/image_picker/image_picker/CHANGELOG.md +++ b/packages/image_picker/image_picker/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.2 + +* Adds comment for the limit parameter. + ## 1.1.1 * Updates documentation to note that Android Photo Picker use is not optional on Android 13+. diff --git a/packages/image_picker/image_picker/lib/image_picker.dart b/packages/image_picker/image_picker/lib/image_picker.dart index 246fe3a4ca18..3e51cc13dac2 100755 --- a/packages/image_picker/image_picker/lib/image_picker.dart +++ b/packages/image_picker/image_picker/lib/image_picker.dart @@ -112,6 +112,9 @@ 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. + /// This value may be ignored by platforms that cannot support it. + /// /// Use `requestFullMetadata` (defaults to `true`) to control how much additional /// information the plugin tries to get. /// If `requestFullMetadata` is set to `true`, the plugin tries to get the full @@ -225,6 +228,9 @@ 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 media that can be selected. + /// This value may be ignored by platforms that cannot support it. + /// /// Use `requestFullMetadata` (defaults to `true`) to control how much additional /// information the plugin tries to get. /// If `requestFullMetadata` is set to `true`, the plugin tries to get the full diff --git a/packages/image_picker/image_picker/pubspec.yaml b/packages/image_picker/image_picker/pubspec.yaml index 3eaabc0a8994..ee854ea43ad5 100755 --- a/packages/image_picker/image_picker/pubspec.yaml +++ b/packages/image_picker/image_picker/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for selecting images from the Android and iOS image library, and taking new pictures with the camera. repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22 -version: 1.1.1 +version: 1.1.2 environment: sdk: ^3.3.0 diff --git a/packages/image_picker/image_picker_android/AUTHORS b/packages/image_picker/image_picker_android/AUTHORS index 57d4f75a1d35..e563a24b660e 100644 --- a/packages/image_picker/image_picker_android/AUTHORS +++ b/packages/image_picker/image_picker_android/AUTHORS @@ -65,3 +65,4 @@ Anton Borries Alex Li Rahul Raj <64.rahulraj@gmail.com> André Sousa +LinXunFeng diff --git a/packages/image_picker/image_picker_android/CHANGELOG.md b/packages/image_picker/image_picker_android/CHANGELOG.md index 0d91ddddcdda..dde51eef8103 100644 --- a/packages/image_picker/image_picker_android/CHANGELOG.md +++ b/packages/image_picker/image_picker_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.12+3 + +* Update documentation to note that limit is not always supported. + ## 0.8.12+2 * Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. diff --git a/packages/image_picker/image_picker_android/README.md b/packages/image_picker/image_picker_android/README.md index 0a20e39897c5..14cbc4891260 100755 --- a/packages/image_picker/image_picker_android/README.md +++ b/packages/image_picker/image_picker_android/README.md @@ -33,5 +33,8 @@ import 'package:image_picker_platform_interface/image_picker_platform_interface. } ``` +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. + [1]: https://pub.dev/packages/image_picker [2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin +[3]: https://developer.android.google.cn/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia diff --git a/packages/image_picker/image_picker_android/pubspec.yaml b/packages/image_picker/image_picker_android/pubspec.yaml index 4e4980c581cf..1bb91c514db2 100755 --- a/packages/image_picker/image_picker_android/pubspec.yaml +++ b/packages/image_picker/image_picker_android/pubspec.yaml @@ -2,7 +2,7 @@ name: image_picker_android description: Android implementation of the image_picker plugin. repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22 -version: 0.8.12+2 +version: 0.8.12+3 environment: sdk: ^3.4.0