You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been meaning to standardize everything for my flutter projects. I have some thoughts regarding the User Profile State...
To keep the user state globally, I'd usually just create a ChangeNotifierProvider at the root to notifyListeners() when anything changes. Is that still a good approach when using Stacked?
If it is so, should the StackedApp implement a way to include "Global Providers" to handle global states?
I was thinking that with your approach, the UserService will be global because of Get_it at setupLocators(), but when a change is pushed, since it isn't a view model, changes wont be reflected through the app...
I think wrapping every View with a UserServiceViewModel would not be optimal...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Thanks a lot for your structure!
I've been meaning to standardize everything for my flutter projects. I have some thoughts regarding the User Profile State...
To keep the user state globally, I'd usually just create a ChangeNotifierProvider at the root to notifyListeners() when anything changes. Is that still a good approach when using Stacked?
If it is so, should the
StackedAppimplement a way to include "Global Providers" to handle global states?I was thinking that with your approach, the
UserServicewill be global because ofGet_itatsetupLocators(), but when a change is pushed, since it isn't a view model, changes wont be reflected through the app...I think wrapping every View with a
UserServiceViewModelwould not be optimal...All reactions