Skip to content

[image_picker] Document that retrieving lost data is a one-time operation - #12784

Open
leejia324 wants to merge 2 commits into
flutter:mainfrom
leejia324:docs/document-lost-data-is-destructive
Open

[image_picker] Document that retrieving lost data is a one-time operation#12784
leejia324 wants to merge 2 commits into
flutter:mainfrom
leejia324:docs/document-lost-data-is-destructive

Conversation

@leejia324

@leejia324 leejia324 commented Sep 8, 2026

Copy link
Copy Markdown

Documents that lost-data retrieval is destructive: once the lost data is
returned it is cleared, so subsequent calls return an empty result. Adds the
note at both the app-facing layer (ImagePicker.retrieveLostData) and the
platform interface (ImagePickerPlatform.getLostData), matching the intended
behavior described in the issue.

This is a documentation-only change (dartdoc plus CHANGELOG), so adds no tests
(test-exempt).

Fixes flutter/flutter#164223

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.

Footnotes

  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. 2

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation for ImagePicker.retrieveLostData and ImagePickerPlatform.getLostData to clarify that retrieving lost data is a one-time operation which clears the stored data, causing subsequent calls to return an empty response. Corresponding changelog entries have also been added. There are no review comments, so no additional feedback is provided.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! Because of the volume of PRs we receive, we require that new contributors use our checklist to guide them through critical steps in creating a Flutter PR. This PR's does not use this repository's checklist, so it is being marked as a Draft.

Please edit the PR description to add the correct checklist, then ensure that you have completed all of the steps. Once you've done that, please mark the PR as ready for review.

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

Also, please don't @-reference people in PR descriptions or commit messages, as it causes significant notification issues when people update their forks. I have removed the username reference from the PR description.

@stuartmorgan-g
stuartmorgan-g marked this pull request as draft September 8, 2026 15:26
@leejia324
leejia324 marked this pull request as ready for review September 8, 2026 15:34

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation and changelogs for both image_picker and image_picker_platform_interface to clarify that retrieving lost data is a one-time operation that clears the stored data. There are no review comments, and I have no feedback to provide.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

This is a documentation-only change (dartdoc plus CHANGELOG), so it uses a
## NEXT CHANGELOG entry without a version bump

Could you point me to where in the linked documentation you saw this listed as a documented exception to our versioning policy?

@leejia324

Copy link
Copy Markdown
Author

You're right, thank you for the correction. I misread the policy: dartdoc changes on exported APIs are not version-exempt, so NEXT was incorrect here. I've bumped the patch versions (image_picker 1.2.4, image_picker_platform_interface 2.11.2) and updated both CHANGELOGs accordingly.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

I misread the policy

Could you let us know which part of the policy was confusing on this point, so that we can clarify the docs?

@leejia324

Copy link
Copy Markdown
Author

Honestly, the policy reads clearly on a reread. The mistake was mine: I assumed the doc-only case was version-exempt and added the NEXT entry before actually checking the versioning section, rather than any specific passage being unclear. So I don't think there's a documentation gap to fix here. Thanks for the careful review.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

I assumed the doc-only case was version-exempt and added the NEXT entry before actually checking the versioning section

I see. In the future, please don't explicitly claim to have followed instructions ("I followed the version and CHANGELOG instructions") if you haven't actually read them. Reviews will go much more smoothly if comments accurately represent what has been done in the PR.

@stuartmorgan-g stuartmorgan-g left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks!

@tarrinneal for secondary review.

@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[image_picker] retrieveLostData documentation should be clear if it's destructive

2 participants