1

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.

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

2

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.

Tim Jacobs
  • 1,023
  • 1
  • 8
  • 14