asSingleton method

ServiceDefinition<T> asSingleton()

Creates a new instance of the service definition as a singleton

Implementation

ServiceDefinition<T> asSingleton() => ServiceDefinition<T>(
      factory,
      isSingleton: true,
      dispose: dispose,
    );