Is there a way to remove all states in state management in flutter?

Viewed 324

So currently i am using flutter providers package for managing state in my app.

Things i am able to do currently:

  1. Maintaining a bool variable and using it to maintain states globally.
  2. Having a string in which there is some text and it changes as user types in something and displayed on home page.

when i click on a button is there a way to erase all my maintained states to earlier one, i.e. to remove all states? I am managing lots of states for my app and it is cumbersome to manually change them to earlier one on clicking button.

1 Answers

Check out this question. The top answer is by the author of the Provider package. Alternatively, you could try out the Phoenix package as suggested in another response.

Related