setMockInitialValues static method

  1. @visibleForTesting
void setMockInitialValues(
  1. Map<String, Object> values

Initializes the shared preferences with mock values for testing.

If the singleton instance has been initialized already, it is nullified.


static void setMockInitialValues(Map<String, Object> values) {
  final Map<String, Object> newValues =<String, Object>((String key, Object value) {
    String newKey = key;
    if (!key.startsWith(_prefix)) {
      newKey = '$_prefix$key';
    return MapEntry<String, Object>(newKey, value);
  SharedPreferencesStorePlatform.instance =
  _completer = null;