-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Dispose camera when navigated to another page #330
base: master
Are you sure you want to change the base?
Conversation
Thanks for submitting your PR! How can we see the behaviour difference? I tried with the |
@apalala-dev You're right. The example code in the Here is a preview of the example code in From.Example.code.mp4A preview from this PR The camera is disposed when a new page is pushed and re-initialized when popping back to the camera page From.This.PR.mp4 |
I just tried it and you're right, it disposes correctly the camera. However, it also implies that when you get the focus back, the camera configuration is reset.
I am not sure how it could be solved without adding a lot of complexity. I believe it would need:
Each time we would want to add an option, this logic would have to be respected (which might not be easy for a new contributor). An other point to consider is that the package |
While I agree with your interpretation, I see this bug/issue as a foundational pre-requisite to anyone incorporating this package in their project. Presuming that |
Hello folks. Is there any news on manual dispose() method ? I don't use Navigator.pushReplacementNamed at all and I'd like to navigate between different modules in my app manually disposing Cameraawesome. |
Description
Possible fix for #86
This pull request contains changes that disposes the camera when navigated to a new page and re-initialize the camera when popped back to the camera page.
Checklist
Before creating any Pull Request, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).flutter analyze
without any issues.Breaking Change
If your feature break something, please detail it