Giter VIP home page Giter VIP logo

Comments (7)

lukehutch avatar lukehutch commented on August 25, 2024

OK, I found a way to do this efficiently using Expando. ReactiveValueNotifier is now a subclass though, not an extension. Published in 2.0.0. Thanks for the report!

from flutter_reactive_value.

alwerr avatar alwerr commented on August 25, 2024

Does its fixed now? No memory leaks?

from flutter_reactive_value.

lukehutch avatar lukehutch commented on August 25, 2024

@alwerr There should be no memory leaks now, correct. But it is hard to test this, because testing this requires the garbage collector to be triggered.

from flutter_reactive_value.

alwerr avatar alwerr commented on August 25, 2024

Ok. thanks, great package, @lukehutch do you still use it?

from flutter_reactive_value.

lukehutch avatar lukehutch commented on August 25, 2024

I actually don't use it anymore, because I have much more complex needs for ValueNotifiers now, such as defining a ValueNotifier that reactively responds to changes in multiple other ValueNotifiers (allowing a reactive DAG of notifies to be built). Also I use my other package, Persistent ValueNotifier a lot, and that no nonger works together with ReacrltiveValueNotifier as of version 2.0. So at this point I have about 8 different subclasses of ValueNotifier built for different purposes, and I just use them with ValueListenableBuilder, or my own alternative to that class which I also built (but haven't published yet).

The simplest thing to use today in general is simply ValueNotifier with ValueListenableBuilder, since both are included in Flutter.

from flutter_reactive_value.

alwerr avatar alwerr commented on August 25, 2024

Persistent ValueNotifier looks really helpful, so I guess I would use ValueNotifier with ValueListenableBuilder too, are they working in stateless widget too? like in this package?

from flutter_reactive_value.

lukehutch avatar lukehutch commented on August 25, 2024

Yes, ValueListenableBuilder is a stateful widget that rebuilds when the ValueNotifier it is watching changes. It can be used inside any widget (including a stateless widget). It's very simple to use. And PersistentValueNotifier works perfectly with it.

from flutter_reactive_value.

Related Issues (5)

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.