subscribeOnce static method
Implementation
static subscribeOnce(String message, _Callback cb) {
String token = EventEmitter.subscribe(message, cb);
// Throw: Concurrent modification
// -----------------------
// token = EventEmitter.subscribe(message, (data) {
// cb(data);
// EventEmitter.unsubscribe(token);
// });
onceTokens.putIfAbsent(message, () => []).add(token);
}