Skip to content

Conversation

@RobertOdrowaz
Copy link
Contributor

Migrates camera wrappers as part of flutter/flutter#119109

This (last wrappers related 🎉) PR migrates wrappers to Swift:

  • FLTSavePhotoDelegate
  • FLTWritableData
  • FLTImageStreamHandler
  • CameraProperties
  • QueueUtils

In line with Swift conventions, the FLT prefixes are removed.

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 from Objective-C to Swift, focusing on several wrapper and utility classes like FLTSavePhotoDelegate, FLTWritableData, FLTImageStreamHandler, CameraProperties, and QueueUtils. The migration is well-executed, adhering to Swift conventions by removing the 'FLT' prefixes and adopting modern Swift patterns.

My review includes a few suggestions:

  • A potential bug in SavePhotoDelegate where a nil photo data case is not handled, leading to a false success report.
  • A correction for misleading documentation in SavePhotoDelegate.swift.
  • A recommendation to use preconditionFailure instead of assertionFailure in CameraProperties.swift for a known invalid input to ensure robustness in release builds.

@RobertOdrowaz RobertOdrowaz force-pushed the feature/camera-wrappers-swift-migration-part6 branch from 34ecb9b to 8d3b1ab Compare January 19, 2026 16:39
@RobertOdrowaz
Copy link
Contributor Author

@hellohuanlin You can take a look again (I've resolved the nit and responded to the rest of the comments)

@RobertOdrowaz RobertOdrowaz added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 22, 2026
@auto-submit auto-submit bot merged commit 2dc24c5 into flutter:main Jan 22, 2026
81 checks passed
linchen00 pushed a commit to linchen00/packages that referenced this pull request Jan 23, 2026
Migrates camera wrappers as part of flutter/flutter#119109

This (last wrappers related 🎉)  PR migrates wrappers to Swift:
* `FLTSavePhotoDelegate`
* `FLTWritableData`
* `FLTImageStreamHandler`
* `CameraProperties`
* `QueueUtils`

In line with Swift conventions, the `FLT` prefixes are removed.

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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.

(cherry picked from commit 2dc24c5)
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.

2 participants