LevitDependency<S> class

Metadata and instance container for a registered dependency.

LevitDependency tracks the lifecycle state, creation strategy, and persistence of a dependency within a LevitScope.

Constructors

LevitDependency({S? instance, S builder()?, Future<S> asyncBuilder()?, bool permanent = false, bool isLazy = false, bool isFactory = false})
Internal constructor for creating dependency metadata.

Properties

asyncBuilder Future<S> Function()?
The asynchronous builder function for lazy instantiation.
final
builder → S Function()?
The synchronous builder function for lazy instantiation.
final
hashCode int
The hash code for this object.
no setterinherited
instance ↔ S?
The resolved instance, or null if not yet instantiated.
getter/setter pair
isAsync bool
Whether this registration uses an asynchronous builder.
no setter
isFactory bool
Whether a new instance is created for every resolution request.
final
isInstantiated bool
Whether the instance has been created.
no setter
isLazy bool
Whether the dependency is deferred until first requested.
final
permanent bool
Whether the registration survives a non-forced LevitScope.reset.
final
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