addComponent method

void addComponent(
  1. Entity<Object> entity,
  2. Component component
)

Adds the component to the entity

Implementation

void addComponent(Entity entity, Component component) {
  _di.setDependency(
    Dependency(
      component,
      metadata: DependencyMetadata(
        groupEntity: entity,
        index: _dependencyCount,
      ),
    ),
  );
}