LevitResourceOwnership mixin
Reusable implementation of LevitResourceOwner.
Apply this mixin to a LevitScopeDisposable when a non-controller resource needs the same ownership semantics as LevitController.
- Superclass constraints
- Implemented types
- Mixin applications
Properties
-
disposed
→ Future<
void> -
Completes when cleanup reaches its terminal state.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosing → bool
-
Whether owner cleanup has started.
no setter
- isDisposed → bool
-
Whether cleanup has completed.
no setteroverride
-
ownedResources
→ Iterable<
Object> -
Resources currently tracked by this owner.
no setter
- resourceOwnerPath → String
-
A diagnostic owner path applied to otherwise unnamed reactive resources.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
autoDispose<
T> (T resource) → T -
Compatibility alias for own.
override
-
didAttachToScope(
LevitScope scope, {String? key}) → void -
Called when the object is attached to a LevitScope.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClose(
) → FutureOr< void> -
Called when the object is removed from the scope or the scope is disposed.
override
-
onInit(
) → void -
Called immediately after the object is instantiated.
inherited
-
own<
T> (T resource) → T -
Registers
resourcefor deterministic cleanup and returns it.override -
refreshOwnedReactivePaths(
) → void - Reconciles already-owned reactive diagnostics after scope attachment.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited