-
Notifications
You must be signed in to change notification settings - Fork 77
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
Make the model providers stateful to keep the state of the current model #58
Comments
Wow having the same problem. I am trying to port an app of mine from xamarin.forms to flutter and i am having problem with reinitializing the scopemodel every time keyboard is up. |
You can solve the issue yourself by making the models in a state. If the provider passed the model to it's state it would have a similar effect. The model would technically be made again and the constructor would be called so any initialization stuff would be done over again and thrown away. So maybe just having a special PersistentScopedModel where the model is a builder and the provider builds the model in it's state and does not build it again. |
I'm not sure of an occasion you would WANT the Model to reset when the app is rebuilt, so maybe the provider should take a model builder by default. |
Hey all -- thanks for the feedback! Overall, I think we'll be deprecating this package in favor of the I'd suggest trying out the |
@brianegan Thanks for the heads-up! I have a question. Do we use the master branch or go for v2.0.0? |
Using a Model on a page with a text box, the model will reset because the keyboard rebuilds the app.
The text was updated successfully, but these errors were encountered: