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

BUGFIX: always dispose animation controller #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BrunoRoemers
Copy link

We started using your package and noticed that _CameraFileState doesn't properly dispose of _animationController. This was causing our app to crash with a "red screen of death" whenever we utilized MultipleImageCamera.capture multiple times. (I.e. open camera, take a picture, do something, go back, open another camera, take a picture...) Thanks to the code in this PR the crashes are gone 🎉

I have attached a screen recording that shows a typical sequence of unhandled errors that leads to the "red screen of death". The errors include:

  • FlutterError: _CameraFileState was disposed with an active Ticker.
  • _AssertionError '_elements.contains(element': is not true
  • FlutterError duplicate GlobalKeys detected in widget tree.

We'd be honored if you were to use this code to create a new release for https://pub.dev/packages/multiple_image_camera.

Screen.Recording.2024-07-26.at.15.09.47.1.mov

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

Successfully merging this pull request may close these issues.

1 participant