add method
Add a publication to the specified channels. By default, only adds to the default channel.
Implementation
@override
void add(Event event, {Iterable<String> channels: const [""]}) {
for (String channel in channels) {
List? subs = _subsByChannel[channel];
if (subs == null) {
continue;
}
_logFiner(
"Sending event on channel $channel to ${subs.length} subscribers.");
for (var sub in subs) {
sub.add(event);
}
}
if (_cache != null) {
_cache!.add(event, channels);
}
}