registerService<Service> method

void registerService<Service>(
  1. Service builder(
    1. State state,
    2. ServiceLocator services
    )
)

Registering an external service.

Services may be instantiated from action execute method when then rely on external systems.

Implementation

void registerService<Service>(
    Service Function(State state, ServiceLocator services) builder) {
  _serviceLocator.register<Service, State>(builder);
}