0

I'm using the Provider package with my Flutter app. When the user signs out I would like to reset all the providers to avoid stale data upon the next sign in.

Currently the only way I know to access providers is via Provider.of<T>() which I will have to call once per provider. Is there a simpler way to do this?

Roman
  • 10,309
  • 17
  • 66
  • 101

1 Answers1

0

If you want to clear all state, see this answer from the provider creator himself.

MickaelHrndz
  • 3,604
  • 1
  • 13
  • 23