cherrypick library

Classes

Binding<T>
BindingResolver<T>
Internal interface for resolvers managed by Binding.
CherryPick
Static facade for managing dependency graph, root scope, subscopes, logger, and global settings in the CherryPick DI container.
CherryPickObserver
An abstract Observer for CherryPick DI container events.
CycleDetector
Circular dependency detector for CherryPick DI containers.
Disposable
An interface for resources that require explicit cleanup, used by the CherryPick dependency injection container.
GlobalCycleDetector
GlobalCycleDetector detects and prevents circular dependencies across an entire DI scope hierarchy.
Module
Represents a DI module—a reusable group of dependency bindings.
PrintCherryPickObserver
Diagnostic/Debug observer that prints all events
Scope
Represents a DI scope (container) for modules, subscopes, and dependency resolution (sync/async) in CherryPick.
SilentCherryPickObserver
Silent observer: ignores all events

Mixins

CycleDetectionMixin
Mixin for adding circular dependency detection support to custom DI containers/classes.
GlobalCycleDetectionMixin
Enhanced mixin for global circular dependency detection, to be mixed into DI scopes or containers that want cross-scope protection.

Typedefs

AsyncProviderFactory<T> = Future<T> Function()
Asynchronous factory: Future<T> Function().
AsyncProviderFactoryWithParams<T> = Future<T> Function(dynamic)
Parameterized asynchronous factory: Future<T> Function(dynamic).
ProviderFactory<T> = T Function()
Synchronous factory: T Function().
ProviderFactoryWithParams<T> = T Function(dynamic)
Parameterized synchronous factory: T Function(dynamic).

Exceptions / Errors

CircularDependencyException
Exception thrown when a circular dependency is detected during dependency resolution.