Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/image_picker/image_picker/lib/image_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,13 @@ 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 recorded video.
///
/// This parameter only applies when recording a video using the camera.
/// It does not restrict the duration of videos selected from the gallery,
/// since the underlying platform gallery APIs do not support filtering
/// by video duration.
Comment on lines +273 to +278

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The clarification is great! However, the previous documentation mentioned what happens when maxDuration is not specified (it's infinite). This is useful information that has been removed. Consider re-adding it for completeness.

Suggested change
/// The [maxDuration] argument specifies the maximum duration of the recorded video.
///
/// This parameter only applies when recording a video using the camera.
/// It does not restrict the duration of videos selected from the gallery,
/// since the underlying platform gallery APIs do not support filtering
/// by video duration.
/// The [maxDuration] argument specifies the maximum duration of the recorded video.
/// If no [maxDuration] is specified, the maximum duration will be infinite.
///
/// This parameter only applies when recording a video using the camera.
/// It does not restrict the duration of videos selected from the gallery,
/// since the underlying platform gallery APIs do not support filtering
/// by video duration.


///
/// 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,14 @@ abstract class ImagePickerPlatform extends PlatformInterface {
/// 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 recorded
/// video.
///
/// This parameter only applies when recording a video using the camera.
/// It does not restrict the duration of videos selected from the gallery,
/// since the underlying platform gallery APIs do not support filtering
/// by video duration.

///
/// 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.
Expand Down