setMockInitialValues static method

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

Implementation

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