Skip to content

Conversation

@RobertOdrowaz
Copy link
Contributor

Prepares camera package for pigeon Swift migration as part of flutter/flutter#119109

Current implementation of FormatUtils.selectBestFormat overrides MediaSettings.framesPerSecond. With swift pigeon contracts MediaSettings is non mutable so that will no longer be possible.

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 3

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 effectively refactors the camera package to remove its dependency on the mutability of MediaSettings, which is a necessary preparation for the upcoming Pigeon Swift migration. The changes are well-contained and logical, primarily by introducing a local framesPerSecond property in DefaultCamera and making FormatUtils.findBestFormat a pure function. I have one minor suggestion to improve code readability.

@RobertOdrowaz RobertOdrowaz force-pushed the feature/camera-pigeon-swift-migration-part1 branch from 5fc630a to f4d2b57 Compare February 1, 2026 22:14
@@ -1,3 +1,7 @@
## 0.9.22+10

* Removes dependence on MediaSettings mutability.
Copy link
Contributor

Choose a reason for hiding this comment

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

could you explain more about what this means? Is it removing a feature?

@stuartmorgan-g stuartmorgan-g added the triage-ios Should be looked at in iOS triage label Feb 3, 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.

3 participants