remove method
- K key, {
- bool store = true,
Removes the item with the provided key from the items and provider.
If store is false, then the key will be only removed from the
items and won't be removed from the provider.
Implementation
Future<void> remove(K key, {bool store = true}) async {
Log.debug('remove($key)', '$runtimeType');
if (_disposed) {
return Future.value();
}
await _itemsGuard.protect(() async {
items.remove(key);
});
if (store) {
await provider.remove(key);
}
}