Closed FrankDomburg closed 4 years ago
I solved this by making the StreamProvider
I am just not sure if this is the right approach.
I think that is the right approach. I don't use the global streams in production. I mention in the video I'm only doing it to show that it's possible and what provider can do. But in production i don't use it.
Hello @FilledStacks , I wanted to ask how should I implement themes(light and dark) without global streams?
When I was using redux, I was using a global StreamBuilder
. Can you recommend a different way or give a hint how to implement it now?
@mdazharuddin1011999 with a theme it's a bit different since it's consumed only within the UI part of the code. It's not actually used with business logic. I built a Theme Manager here that you can look at. It uses a global stream.
Thanks for the link, Sir!
Seems a lazy loading issue somewhere.
When I enter a userID, the home_view comes with a name in the header, but no posts. When I go back, enter the same userID, the posts become visible.
When I enter a userID, the home_view comes with a name in the header, but no posts. When I go back, enter the a different userID, the correct posts become visible.
So suspect that userID becomes available to late for the getPosts function to work. But don't understand why, given that the header is displayed correctly.