removeValue method

Future<void> removeValue(
  1. SharedPreferencesAsync prefs
)

Removes the value from both the cache and SharedPreferences.

Clears the cached value and removes the key from SharedPreferences.

Implementation

Future<void> removeValue(SharedPreferencesAsync prefs) async {
  await prefs.remove(key);
  _cachedValue = null;
}