- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.5k
[image_picker] Remove use of Pigeon's Dart test generator #10320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[image_picker] Remove use of Pigeon's Dart test generator #10320
Conversation
| CHANGELOG/version overrides: While technically there is a production code change here, it's just adding an optional, visibible-only-for-tests parameter, and moving one ivar initialization from the declaration to the constructor, so it's pretty clearly a no-op. | 
There was a problem hiding this comment.
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 is a significant improvement, refactoring the image_picker_ios tests to remove the dependency on Pigeon's Dart test generator and align with the image_picker_android implementation. The introduction of dependency injection with a fake API mock makes the tests much cleaner, more focused, and easier to maintain. The removal of the old method call logger and the addition of more granular tests are excellent changes. My review includes a few minor suggestions to make the new tests even more precise by removing or adjusting assertions that check for parameters not relevant to the specific method being tested.
Updates
image_picker_iosto use the same test structure thatimage_picker_androidalready uses:Also does minor cleanup of
image_picker_android; this conversion had already been done there, but it was still generating an unuseddartTestOut.Part of flutter/flutter#159886
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).Footnotes
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 ↩3