applyRegistration method

void applyRegistration(
  1. Registration registration
)

Implementation

void applyRegistration(Registration registration) {
  final element = registration.instance;
  for (final type in registration.types) {
    assert(
      !_elements.containsKey(type),
      '${element.runtimeType} already registered with type $type',
    );
    _elements[type] = element;
  }
}