ContainerOptions class

Configuration options for the Container. The following example shows the typical usage of the ContainerOptions class.

var container = Container();

container.registerSimple<ITimeProvider>(() => DefaultTimeProvider() );

// Use of ContainerOptions class here.
container.options.allowOverridingRegistrations = true;

// Replaces the previous registration of ITimeProvider
container.registerSimple<ITimeProvider>(() => CustomTimeProvider());

Constructors

ContainerOptions({bool allowOverridingRegistrations = false})
const

Properties

allowOverridingRegistrations bool
A value indicating whether the container allows overriding registrations. Default false.
final
hashCode int
The hash code for this object.
no setterinherited
notAllowOverridingRegistrations bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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