decorate method

void decorate(
  1. Type serviceType,
  2. ServiceFactory transform(
    1. ServiceFactory?
    )
)

Replaces the service factory associated with the given service type with the result of transform.

Implementation

void decorate(Type serviceType,
        ServiceFactory Function(ServiceFactory?) transform) =>
    serviceFactories[serviceType] = transform(serviceFactories[serviceType]);