deleteFromCollectionWhere<T> static method
Delete item(s) from a collection using a where query.
Implementation
static Future deleteFromCollectionWhere<T>(bool Function(T value) where,
{required String key}) async {
List<T> collection = await readCollection<T>(key);
if (collection.isEmpty) return;
collection.removeWhere((value) => where(value));
await saveCollection<T>(key, collection);
}