packages icon indicating copy to clipboard operation
packages copied to clipboard

[image_picker] Clarify maxDuration parameter behavior

Open 777genius opened this issue 1 month ago • 0 comments

Description

Updates documentation to explicitly state that the maxDuration parameter only applies when recording videos from the camera (ImageSource.camera), and is ignored when selecting videos from the gallery (ImageSource.gallery).

This addresses confusion reported in issue #83630 where developers expected maxDuration to filter gallery video selections, but it only controls camera recording duration.

Changes

  • Updated README.md with detailed explanation and code examples showing the difference between camera recording and gallery selection
  • Enhanced dartdoc comments for pickVideo() method with important notes about gallery behavior
  • Added clear warnings that maxDuration is ignored for gallery selections

Related Issues

Fixes https://github.com/flutter/flutter/issues/83630

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.

777genius avatar Nov 19 '25 19:11 777genius