addComponent method
Adds the component to the entity.
Implementation
void addComponent(Entity entity, Component component) {
_di.setDependency(
Dependency(
Sync.value(Ok(component)),
metadata: Some(
DependencyMetadata(
groupEntity: entity,
preemptivetypeEntity: TypeEntity(component.runtimeType),
index: Some(_dependencyCount),
),
),
),
);
}