Giter Site home page Giter Site logo

Comments (3)

brianegan avatar brianegan commented on July 19, 2024 1

Heya @kentcb :) Great question, as always! Let me see if I can tackle these:

1

The view has just been created and it needs to reflect data in the VM that has been loaded. -- In this case, I simply grab the strings I need from the store and pass it to my builder function. In the builder function, I use new TextFormField(initialValue: vm.initialValue);

2

I think the second case is the tricky one! Flutter is mostly reactive, but then has these imperative bits like TextEditingControllers and Navigators and it makes working with reactive patterns like Redux a bit harder. To be honest, I'm not sure how easy it would be with any pattern given the challenge with handling the selection :)

Lemme play around with a couple ideas and I'll see If I can come up with something a bit better! I can definitely understand your use case.

from flutter_redux.

kentcb avatar kentcb commented on July 19, 2024

Yeah, the departure from the reactive approach has bitten me with RefreshIndicator as well, which I have lamented here.

It's also interesting to note that whilst TextFormField has an initialValue argument, TextField does not. There are some inconsistencies in flutter's API that I have found confusing, and this is one of them.

from flutter_redux.

brianegan avatar brianegan commented on July 19, 2024

Hey hey -- maybe should have closed this before now, but we now have the onWillChange callback in place. I think it should be the appropriate place to work with changes like this so you do not need to do some weird mutations inside the build method on each draw of the Widget, but only when the data changes!

from flutter_redux.

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.