clearPersistedData method

Future<void> clearPersistedData([
  1. String? persistKey
])

Clears persisted data for the specified persistKey.

Implementation

Future<void> clearPersistedData([String? persistKey]) async {
  if (_socketConfig.persistStream) {
    _prefs ??= await SharedPreferences.getInstance();
    _prefs?.remove(persistKey ?? _socketConfig.persistanceKey);
  }
}