publish2<T, S> method
Publishes the specified event topic
along with the given arguments
arg1
and arg2
to all registered callbacks for that event.
Implementation
void publish2<T, S>(String topic, T arg1, S arg2) {
void _send(Function? fn) => fn!.call(arg1, arg2);
_cache[topic]?.forEach(_send);
_cacheOnce[topic]?.forEach(_send);
_cacheOnce.remove(topic);
}