resetForTesting static method

  1. @visibleForTesting
void resetForTesting()

Forgets the initialized preferences so the next init runs again.

Only for tests: SharedPreferences.setMockInitialValues swaps the platform store, but this class holds a SharedPreferences instance with its own populated cache, so without this a mocked store from one test is invisible and the previous test's alarms leak into the next.

Implementation

@visibleForTesting
static void resetForTesting() {
  dispose();
  _initFuture = null;
}