Version: 9.2.0
Testing
Cleaning your providers#
Before or after each test you will need the default state of all StateNotifier or Bloc. So you can use ProvidersContainer.clear();
Overriding providers#
Consider the next provider
Sometimes, for our unit tests or widget tests, we need to mock the behavior of a certain class. In those cases, we can use the overrideCreator function to override the way our provider creates our notifiers.
Next before your test you can use the setUp method.