LevitDependency<S> class
Metadata container for a dependency registered within a LevitScope.
This class tracks the lifecycle state, creation strategy, and persistence settings for a specific registration.
Constructors
-
LevitDependency({S? instance, S builder()?, Future<
S> asyncBuilder()?, bool permanent = false, bool isLazy = false, bool isFactory = false}) - Creates metadata for a dependency registration.
Properties
-
asyncBuilder
→ Future<
S> Function()? -
The asynchronous builder function for async instantiation.
final
- builder → S Function()?
-
The synchronous builder function for lazy or factory instantiation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- instance ↔ S?
-
The resolved instance, or
nullif 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 lookup.
final
- isInstantiated → bool
-
Whether the instance has been created and is currently active.
no setter
- isLazy → bool
-
Whether the instance creation is deferred until the first lookup.
final
- permanent → bool
-
Whether the registration persists across 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