Skip to content
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

Restoration Framework #564

Open
nikitadol opened this issue Oct 30, 2020 · 3 comments
Open

Restoration Framework #564

nikitadol opened this issue Oct 30, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@nikitadol
Copy link
Contributor

Are there any plans to implement this for providers?
https://docs.google.com/document/d/1KIiq5CdqnSXxQXbZIDy2Ukc-JHFyLak1JR8e2cm3eO4/edit#

@nikitadol nikitadol added enhancement New feature or request needs triage labels Oct 30, 2020
@rrousselGit
Copy link
Owner

What are you expecting from provider here?

provider is for business state, which is in the "domain state" category. Domain state if out of the scope of the restoration API

@nikitadol
Copy link
Contributor Author

For example, I have a search provider.
I do not need to store this data between application launches, but I would like the state to persist if the system kills the Activity.

Therefore, it would be convenient if the provider provided an API so that my provider class could save its state

@vgribok
Copy link

vgribok commented Aug 9, 2021

The issue is broader than what Provider can or cannot do, and could be restated as follows:

Any framework or library (like Provider or Flutter 2 Navigator) enabling the app to use StatelessWidget+ChangeNotifier pattern, thus making StatefulWidget largely unnecessary, leads to RestorationMixin - which seems to be the cornerstone of the state restoration - being useless due to its dependency on the StatefulWidget.

To solve this problem, an example of how to implement app state restoration for the app that uses stateless widgets and gets its state from change notifiers, would be supremely helpful.

@rrousselGit rrousselGit self-assigned this May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants