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
Hi, I dont know how to ask this so I dont know how to search this on web...
GetX provide 1 controller per view, ok
But my application (flutter web app), has user information such: is logged, email, name, etc.
If user is not logged, he can`t navigate directly to a page by its url. I need to prevent access.
To do this (without getx), I have a class to control user login and have a flag resuming if it is logged and have access. So I am using scoped_model package to structure my view, based on this user logged in flag, and of course I have other scoped_models for the view itself.
How can I design this (simplest way), to have this user information on all pages and of course, as an observable, because I want to display circular progress while user is logging in.
I am trying to do it using a global static reference, but I don`t know if this is the best approach or I need to use the getx_pattern with a controller, provider, etc.
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
-
Hi, I don
t know how to ask this so I don
t know how to search this on web...GetX provide 1 controller per view, ok
But my application (flutter web app), has user information such: is logged, email, name, etc.
If user is not logged, he can`t navigate directly to a page by its url. I need to prevent access.
To do this (without getx), I have a class to control user login and have a flag resuming if it is logged and have access. So I am using scoped_model package to structure my view, based on this user logged in flag, and of course I have other scoped_models for the view itself.
How can I design this (simplest way), to have this user information on all pages and of course, as an observable, because I want to display circular progress while user is logging in.
I am trying to do it using a global static reference, but I don`t know if this is the best approach or I need to use the getx_pattern with a controller, provider, etc.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions