clearWithParameters method
Removes all keys and values in the store that match options
.
Implementation
@override
Future<bool> clearWithParameters(ClearParameters parameters) async {
final PreferencesFilter filter = parameters.filter;
final Map<String, Object> preferences = await _readPreferences();
preferences.removeWhere((String key, _) =>
key.startsWith(filter.prefix) &&
(filter.allowList == null || filter.allowList!.contains(key)));
return _writePreferences(preferences);
}