-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication state #1
Comments
Hello @aniltc-rails, for the first question, the simplest solution is to have a singleton class where you store the state of your app, and creating methods ad hoc for login and logout. You could make the instance of this class global or use an InheritedWidget (I think it is a better solution) so that in this way all the widgets on the tree can access to the same source of data. You can find this architecture in my trivia example, where I have an AppState class for the state of the app and a TriviaBloc for the business logic of the game. For the second question it is not easy to explain without writing a specific example but it's a good argument for writing an article about it, so I think I'll write something as I have a little free time. |
Thanks for your reply |
Hello @aniltc-rails, I've just wrote a little example, you can find it in this branch: https://github.com/frideosapps/frideos_examples/tree/dynamic_form_fields. |
Great , Will check examples. ---Missing Delete option & submit button. But its looking good |
Hello, the submit button is the one the top of the screen showing "Valid" or "Form not valid" text and calling the "someActions" method on the BLoC class, but it does nothing more the showing a print on the debug console. The delete option is missing, check out this repo in the next days cause I'm planning to make a thorough refactoring of the app and I'll add this feature too. I'm going to close this issue and pin it for the other users asking for the same thing. Feel free to reopen it or a new one. |
Can you publish or explain how to maintain login state through out application/widgets and when we click logout it should be reset (should clear token). Is it possible ?
if we have multiple dynamic text boxes ( let us say (name1 & name 2),
here name 1 is a textbox
and name 2 is a textbox and We will have a button to add more textbox group. if we click another name1 and name2 will be displayed. Its a multiform. How to handle this situation.
Thanks
The text was updated successfully, but these errors were encountered: