removeValue method

Future<void> removeValue(
  1. SharedPreferences prefs
)

Removes the value from both the cache and SharedPreferences.

Clears the cached value and removes the key from SharedPreferences.

Implementation

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