Skip to content

Conversation

RobertOdrowaz
Copy link
Contributor

Migrates camera implementation as part of flutter/flutter#119109

This PR migrates the 9th chunk of FLTCam class to Swift:

  • init
  • Moves fields that no longer need to be accessible from FLTCam to DefaultCamera
  • Removes unused textureId field from FLTCam (it seems cameraId is used as "texture id" and this field wasn't used for a while now)
  • Typo correction in a comment so there is a bunch of files with just change in comment

Some properties of the FLTCam have to be temporarily made public so that they are accessible in DefaultCamera.

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 continues the migration of the camera_avfoundation plugin to Swift by moving the FLTCam initialization logic into the Swift DefaultCamera class. This includes moving many properties from the Objective-C superclass to the Swift subclass, improving encapsulation. The changes are well-structured and the updates to tests and other parts of the codebase are consistent with the migration.

My review includes a few suggestions to improve maintainability and fix a potential issue in the new DefaultCamera initializer related to error handling and testability.

@stuartmorgan-g
Copy link
Collaborator

From triage: is this waiting on anything to be landed?

@RobertOdrowaz
Copy link
Contributor Author

I'm on vacation ATM. I will land this once I'm back on Friday

@RobertOdrowaz RobertOdrowaz force-pushed the feature/camera-implementation-swift-migration-part12 branch from 7d7fe6d to 5532f6f Compare August 29, 2025 16:03
@RobertOdrowaz RobertOdrowaz added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 29, 2025
@auto-submit auto-submit bot merged commit 0a34f71 into flutter:main Aug 29, 2025
80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: camera platform-ios platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants