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

390

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.

Share:
390
Lakhan Kumawat
Author by

Lakhan Kumawat

Updated on January 01, 2023

Comments

  • Lakhan Kumawat
    Lakhan Kumawat over 1 year

    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.