dependency_box library

A high-performance, lightweight, and zero-dependency inversion-of-control (IoC) container and dependency injection box for Dart and Flutter.

Classes

BoxDependencyRef
Represents a unique dependency identifier combining a type and an optional key.
ContainerSnapshot
Represents a point-in-time, read-only snapshot of a DependencyBox hierarchy.
DependencyBox
An inversion-of-control container managing dependency registrations, lifecycles, and hierarchical scopes.
DependencyBoxConfig
Centralized configuration defaults and constants for dependency_box.
DependencyDisposable
A resource whose lifecycle is managed by a DependencyBox.
DependencyModule
Represents a modular collection of dependency registrations.
DiagnosticNotice
Represents a diagnostic issue, warning, or notice about the container state.
FirstResolution
Strategy that resolves the first (initial) registered instance.
IndexResolution
Strategy that resolves the instance registered at the specified 0-based index.
KeyResolution
Strategy that resolves the instance registered with the specified key.
LastResolution
Strategy that resolves the last (most recently) registered instance.
MultiRegistration<T extends Object>
Represents the configuration for a type that allows multiple registrations in a DependencyBox.
MultiResolution
Defines which instance DependencyBox.get resolves when multiple instances of a type are registered.
RegistrationSnapshot
Represents the snapshot state of a single dependency registration.
ScopeSnapshot
Represents the snapshot state of a single scope (or container level) in the hierarchy.

Enums

DependencyBoxError
Categories of errors that can occur within a DependencyBox.
LookupScope
Defines the search boundary when resolving dependencies across container hierarchies.