Giter VIP home page Giter VIP logo

Comments (4)

huycozy avatar huycozy commented on July 22, 2024 1

to set it to null at disposal automatically

Hi. I think this is quite clear. The it here is your CameraController instance that should be handled at the level of your code.

This doesn't seem to be an appropriate bug or feature request, so I'm going to close the issue. If you disagree, please write in the comments with more information and I will reopen it.

from flutter.

huycozy avatar huycozy commented on July 22, 2024

wouldn't not create unnecessary bugs like in my case

Could you elaborate on which bug was created in your case? Per my understanding, _controller is a nullable variable of CameraController, you can set it to null manually, right?

from flutter.

tomasbaran avatar tomasbaran commented on July 22, 2024

@huycozy Thanks for your comments. It's more of a suggestion and I'm not even sure whether it's a good idea. Just sharing my experience.

  • Yes, I can set it to null manually.

  • I expected that disposing of the controller would also set it to null: maybe I was having a wrong expectation. So, that caused the bugs since the next time I was trying to access the controlled the disposed one was not a null but lived in a _controller variable.

  • I fixed the bug by manually setting it to null. I was just trying to see whether it would not be a good idea to set it to null at disposal automatically. I'd love to your views on that.

from flutter.

github-actions avatar github-actions commented on July 22, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

from flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.