Skip to content
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

[camera] - Fix component CameraPreview on Flutter use impeller #8068

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jhonathanqz
Copy link

@jhonathanqz jhonathanqz commented Nov 12, 2024

Fixed CameraPreview component, because after updating Flutter to impiller, it was mirroring the camera preview.

Below is the link to the open ISSUE that this PR attempts to resolve.
flutter/flutter#156974

List which issues are fixed by this PR. You must list at least one issue.

Pre-launch Checklist

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

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

Copy link

google-cla bot commented Nov 12, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jhonathanqz jhonathanqz changed the title fix camera preview on flutter use impeller [FIX] - Camera preview on flutter use impeller Nov 12, 2024
@jhonathanqz jhonathanqz changed the title [FIX] - Camera preview on flutter use impeller [FIX] - Camera preview on Flutter use impeller Nov 12, 2024
@stuartmorgan
Copy link
Contributor

Thanks for the contribution! You haven’t checked off any of the items in the PR checklist above, so I’m assuming this is a work in progress and am marking it as a Draft. Please review the checklist, updating the PR as appropriate, and when that’s complete please feel free to mark the PR as ready for review.

@stuartmorgan stuartmorgan marked this pull request as draft November 12, 2024 21:05
@jhonathanqz jhonathanqz changed the title [FIX] - Camera preview on Flutter use impeller [camera] - Camera preview on Flutter use impeller Nov 13, 2024
@jhonathanqz jhonathanqz marked this pull request as ready for review November 13, 2024 11:31
@jhonathanqz jhonathanqz changed the title [camera] - Camera preview on Flutter use impeller [camera] - Fix component CameraPreview on Flutter use impeller Nov 13, 2024
@jhonathanqz
Copy link
Author

@stuartmorgan I have already updated the PR and requested a review again. The PR corrects the CameraPreview component referring to the [camera] package, because when Flutter started using [impeller] the camera preview had a mirrored effect.

@stuartmorgan
Copy link
Contributor

I don't see any issue links in the PR description; please see step 2 in the destination of the linked documentation about our PR process.

  • I added new tests to check the change I am making, or this PR is test-exempt.

This will need a test. The fact that this is being done unconditionally in the cross-platform code when camera supports platforms that always use impeller, platforms that never use impeller, and platforms that may or may not use impeller depending on the Flutter version and user-provided flags seems unexpected, so tests that validate this on all platforms camera supports will be important.

@jhonathanqz
Copy link
Author

@stuartmorgan
I modified the code to use this mirroring correction only for Android and iOS platforms.
The link to an open issue with this problem was also mentioned in the header.

@stuartmorgan
Copy link
Contributor

I modified the code to use this mirroring correction only for Android and iOS platforms.

Platform-specific code generally does not belong in the app-facing package. The issue of assuming that impeller is enabled in all cases on those platforms is also not addressed by that change.

Also, this still needs tests, per Flutter policy, as described in the contributing docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants