set<T> method

void set<T>(
  1. ServiceFactory? factory
)

Sets the publication service factory for the given service type.

Implementation

void set<T>(ServiceFactory? factory) {
  if (factory != null) {
    serviceFactories[T] = factory;
  } else {
    serviceFactories.remove(T);
  }
}