ServiceDefinition<T> constructor

const ServiceDefinition<T>(
  1. T factory(
    1. IocContainer container
    ), {
  2. bool isSingleton = false,
  3. void dispose(
    1. T service
    )?,
})

Defines a factory for the service and whether or not it is a singleton.

Implementation

const ServiceDefinition(
  this.factory, {
  this.isSingleton = false,
  this.dispose,
});