GithubHelp home page GithubHelp logo

Comments (4)

jamesderlin avatar jamesderlin commented on August 23, 2024

There is no variable named updateTime. Do you mean VisibilityDetectorController.updateInterval? That is already configurable and documented.

from flutter.widgets.

jamesderlin avatar jamesderlin commented on August 23, 2024

BTW, while 500ms might be too long for your liking, I would not recommend setting updateInterval to Duration.zero to get updates on every frame, particularly for cases where the user scrolls quickly. Doing that could inundate you with callbacks, and even if a chat message was visible for a single frame, it is unlikely that the user could have actually read it in 1/60th of a second.

from flutter.widgets.

mishatron avatar mishatron commented on August 23, 2024

There is no variable named updateTime. Do you mean VisibilityDetectorController.updateInterval? That is already configurable and documented.

I fixed variable name. so for what is recommended to use Duration.zero?

from flutter.widgets.

jamesderlin avatar jamesderlin commented on August 23, 2024

You're free to set updateInterval to Duration.zero if you really want visibility callbacks to fire on every frame. It's useful for tests. I just don't personally recommend using that value in a production app since I think it would be overkill, would be too noisy, and wouldn't offer much benefit over using a small but non-zero Duration.

from flutter.widgets.

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.