delete method
Implementation
@override
void delete({required String topic, String? id}) {
if (id == null) {
_map.remove(topic);
return;
}
if (!_map.containsKey(topic)) return;
final ids = get(topic);
if (!exists(topic, id)) return;
final remaining = ids.where((x) => x != id).toList();
if (remaining.isEmpty) {
_map.remove(topic);
return;
}
_map[topic] = remaining;
}