clear method

Future<void> clear()

Clears the persisted value.

Implementation

Future<void> clear() async {
  try {
    await _sharedPreferences.remove(key);
    value = super.value;
    _lastSavedValue = null;
    debugPrint('Persistro: Cleared $key');
  } catch (e) {
    debugPrint('Persistro: Error clearing $key: $e');
  }
}