Saying that the combination Stateful+Inherited is mutable and that Inherited+Stream isn't is weird. A stream is a mutable class. We can read its content at two different points in time, and the content may have changed. On the other hand, the stateful+inherited combination isn't. The object instance returned by `MyInherited.of(context)` is completely immutable, and the only way to have a different value is to call the `.of` method again. Similarly, the whole point of InheritedWidget is to ensure that widgets are always in sync with the data. The Stateful+Inherited is not the "dark side". InheritedWidget is explicitly built with this in mind. Also, scoped_model doesn't follow the Stateful+Inherited pattern as you've explained. It uses a Listenable, which essentially is the same as a Stream.
I think your "Light vs Dark" is not about immutable vs mutable. Both approaches have a mutation at some point. Instead, it's about reactive vs declarative programming.
Great video, thank you! Loving this Flutter series
Amazing videos, But who are the 3 people that disliked that tuto !!!!!
Saying that the combination Stateful+Inherited is mutable and that Inherited+Stream isn't is weird.
A stream is a mutable class. We can read its content at two different points in time, and the content may have changed.
On the other hand, the stateful+inherited combination isn't. The object instance returned by `MyInherited.of(context)` is completely immutable, and the only way to have a different value is to call the `.of` method again.
Similarly, the whole point of InheritedWidget is to ensure that widgets are always in sync with the data.
The Stateful+Inherited is not the "dark side". InheritedWidget is explicitly built with this in mind.
Also, scoped_model doesn't follow the Stateful+Inherited pattern as you've explained. It uses a Listenable, which essentially is the same as a Stream.
Hello, thanks for your answer! I hope I didn't sound harsh :)
Sure, we can meet. Do you have a mail?
I really enjoyed the episode and can't wait for the upcoming 'final architecture' 👌
very well explained, thanks for sharing!
I think your "Light vs Dark" is not about immutable vs mutable.
Both approaches have a mutation at some point. Instead, it's about reactive vs declarative programming.
great explanation
What is better approach for state management ? Which one is your favorite ? @zaiste
nice
Which state management you prefer for a complete chat application with flutter and websocket (InheritedWidget or bloc)?
Do you recommended Felix’s block plugin?
Sir till 20 Episode I have completed, But after giving windows i lost the project .Please anyone help me .Please zaista help me.
Well that's how Provider works -> the package from pub dev, it simplifies all that ? no ?
Yes, provider package is based on inherited widget.