LevitRef class

A lightweight bridge passed to LevitState builders.

LevitRef provides access to dependency injection and automated resource management within a functional state builder. It acts as a proxy to the LevitScope that owns the state.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope LevitScope
The LevitScope that currently owns this state.
no setter

Methods

autoDispose<T>(T object) → T
Registers an object for automatic cleanup when the state is disposed.
find<S>({dynamic key, String? tag}) → S
Resolves a dependency of type S from the current or parent scope.
findAsync<S>({dynamic key, String? tag}) Future<S>
Asynchronously resolves a dependency of type S.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose(void callback()) → void
Registers a callback to be executed when the state is disposed.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited