dispatchObjectCreated method
Create ObjectCreated and invoke dispatchObjectEvent if there are listeners.
This method is more efficient than dispatchObjectEvent if the event object is not created yet.
Implementation
void dispatchObjectCreated({
required String library,
required String className,
required Object object,
}) {
if (!hasListeners) {
return;
}
dispatchObjectEvent(ObjectCreated(
library: library,
className: className,
object: object,
));
}