Open kaboc opened 1 year ago
Regarding the first case, I think the non-null assertion operator (!
) should be avoided when methods are called on the CameraController. Even if it is checked before the try block that the controller is not null, it is possible that it turns to null while futures are awaited. It is safer to use ?
instead.
Hi there!
It looks like this issue has been fixed in the main branch. Please check to see if the issue has been resolved for you and let me know if you have any further issues or questions.
Thanks for bringing this to my attention!
@khoren93 Hi, thanks for quickly looking into the issue.
I ran the same code with the latest commit in the main branch.
a) The issue still seems to be around, although the output is different now. It has the first two lines without stack trace.
I/flutter (22532): Error: A CameraController was used after being disposed. I/flutter (22532): Once you have called dispose() on a CameraController, it can no longer be used.
b) The app raises the same error.
Steps to reproduce:
It gives different errors depending on how quickly the dialog is closed.
a) If it is very quick:
b) If it is a little later: