From c2c262d59db1cbba202845ebd57ae221d5007322 Mon Sep 17 00:00:00 2001 From: abdessalem Date: Thu, 2 Apr 2026 11:39:11 +0100 Subject: [PATCH 1/3] Update documentation of maxDuration to reflect that it only applies to recording --- packages/image_picker/image_picker/CHANGELOG.md | 4 +++- packages/image_picker/image_picker/lib/image_picker.dart | 4 ++-- packages/image_picker/image_picker/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/image_picker/image_picker/CHANGELOG.md b/packages/image_picker/image_picker/CHANGELOG.md index f60755dd1615..a53805d1b7f9 100644 --- a/packages/image_picker/image_picker/CHANGELOG.md +++ b/packages/image_picker/image_picker/CHANGELOG.md @@ -1,11 +1,13 @@ -## NEXT +## 1.2.2 +* Clarifies that `maxDuration` only applies to video recording and not gallery selection. * Updates minimum supported SDK version to Flutter 3.35/Dart 3.9. * Updates README to reflect currently supported OS versions for the latest versions of the endorsed platform implementations. * Applications built with older versions of Flutter will continue to use compatible versions of the platform implementations. + ## 1.2.1 * Fixes README description of plugin suggesting that only Android and iOS is supported. diff --git a/packages/image_picker/image_picker/lib/image_picker.dart b/packages/image_picker/image_picker/lib/image_picker.dart index 9e96d5cd73b5..5fac8fa84210 100755 --- a/packages/image_picker/image_picker/lib/image_picker.dart +++ b/packages/image_picker/image_picker/lib/image_picker.dart @@ -270,8 +270,8 @@ class ImagePicker { /// The [source] argument controls where the video comes from. This can /// be either [ImageSource.camera] or [ImageSource.gallery]. /// - /// The [maxDuration] argument specifies the maximum duration of the captured video. If no [maxDuration] is specified, - /// the maximum duration will be infinite. + /// The [maxDuration] argument specifies the maximum duration of the captured video when recording from the camera ([ImageSource.camera]), + /// and is ignored for [ImageSource.gallery], If no [maxDuration] is specified,the maximum duration will be infinite. /// /// Use `preferredCameraDevice` to specify the camera to use when the `source` is [ImageSource.camera]. /// The `preferredCameraDevice` is ignored when `source` is [ImageSource.gallery]. It is also ignored if the chosen camera is not supported on the device. diff --git a/packages/image_picker/image_picker/pubspec.yaml b/packages/image_picker/image_picker/pubspec.yaml index a834a10b95bd..136bc7b9509d 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.2.1 +version: 1.2.2 environment: sdk: ^3.9.0 From 3ea3b5a7ac29a53b49050d38f9ae6b75f4c81731 Mon Sep 17 00:00:00 2001 From: abdessalem Date: Thu, 2 Apr 2026 11:51:36 +0100 Subject: [PATCH 2/3] typo --- packages/image_picker/image_picker/lib/image_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/image_picker/image_picker/lib/image_picker.dart b/packages/image_picker/image_picker/lib/image_picker.dart index 5fac8fa84210..45c5e33f1871 100755 --- a/packages/image_picker/image_picker/lib/image_picker.dart +++ b/packages/image_picker/image_picker/lib/image_picker.dart @@ -270,7 +270,7 @@ class ImagePicker { /// The [source] argument controls where the video comes from. This can /// be either [ImageSource.camera] or [ImageSource.gallery]. /// - /// The [maxDuration] argument specifies the maximum duration of the captured video when recording from the camera ([ImageSource.camera]), + /// The [maxDuration] argument specifies the maximum duration of the captured video when recording from the camera ([ImageSource.camera]), /// and is ignored for [ImageSource.gallery], If no [maxDuration] is specified,the maximum duration will be infinite. /// /// Use `preferredCameraDevice` to specify the camera to use when the `source` is [ImageSource.camera]. From 010c8f5958563856626b8d3e805e63ff0bff9536 Mon Sep 17 00:00:00 2001 From: Mohellebi Abdessalem <116356835+AbdeMohlbi@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:20:55 +0100 Subject: [PATCH 3/3] valid Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- packages/image_picker/image_picker/lib/image_picker.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/image_picker/image_picker/lib/image_picker.dart b/packages/image_picker/image_picker/lib/image_picker.dart index 45c5e33f1871..95fcd19120b9 100755 --- a/packages/image_picker/image_picker/lib/image_picker.dart +++ b/packages/image_picker/image_picker/lib/image_picker.dart @@ -271,7 +271,7 @@ class ImagePicker { /// be either [ImageSource.camera] or [ImageSource.gallery]. /// /// The [maxDuration] argument specifies the maximum duration of the captured video when recording from the camera ([ImageSource.camera]), - /// and is ignored for [ImageSource.gallery], If no [maxDuration] is specified,the maximum duration will be infinite. + /// and is ignored for [ImageSource.gallery]. If no [maxDuration] is specified, the maximum duration will be infinite. /// /// Use `preferredCameraDevice` to specify the camera to use when the `source` is [ImageSource.camera]. /// The `preferredCameraDevice` is ignored when `source` is [ImageSource.gallery]. It is also ignored if the chosen camera is not supported on the device.