addEvent method
Implementation
bool addEvent(int instanceId, int nodeId, String eventName) {
bool addSuccess = false;
var instanceMap = _instanceEventMap[instanceId];
if (instanceMap != null) {
var nodeEventSet = instanceMap[nodeId]??<String>{};
if (!nodeEventSet.contains(eventName)) {
nodeEventSet.add(eventName);
addSuccess = true;
}
instanceMap[nodeId] = nodeEventSet;
}
return addSuccess;
}