IocContainerBuilder class

A builder for creating an IocContainer.

Available Extensions
Annotations
  • @immutable

Constructors

IocContainerBuilder({bool allowOverrides = false})
Creates a container builder

Properties

allowOverrides bool
Throw an error if a service is added more than once. Set this to true when you want to add mocks to set of services for a test.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addServiceDefinition<T>(ServiceDefinition<T> serviceDefinition) → void
Add a factory to the container.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toContainer({bool isLazy = false}) IocContainer
Create an IocContainer from the IocContainerBuilder. This will create an instance of each singleton service and store it in an immutable list unless you specify isLazy as true.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited