addObjectEvent method
void
addObjectEvent(})
Implementation
void addObjectEvent(Map<int, Map<String, EBusItem>> map, dynamic registerObject, {String? action, Function? method}) {
if (registerObject == null || action.isEmptyString || method == null) {
return;
}
var registerHashcode = registerObject.hashCode;
var busList = map[registerHashcode];
if (busList == null) {
busList = {};
busList[action ?? ""] = EBusItem(action ?? "", method);
map[registerHashcode] = busList;
} else {
//如果同一对象(即内存地址相同),直接覆盖
busList[action ?? ""] = EBusItem(action ?? "", method);
}
}