addEvent method
Implementation
void addEvent(String? id, String? type) {
if (!_listenMap.containsKey(id)) {
// Init listener map
_listenMap[id] = {};
}
// Mark event type listened
var listeners = _listenMap[id]!;
listeners[type] = true;
}