Read-only component of a reactive ref.
This interface provides read access to a ref's value without the ability to modify it. Use this in APIs where you want to expose reactive state without allowing mutations.
Example
class Counter {
final _count = ref(0);
// Expose read-only access
ReadonlyRef<int> get count => _count;
void increment() => _count.value++;
}
- Implemented types
- Implementers
Properties
Methods
-
call(
) → T - Shorthand for getting value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
peek(
) → T - Gets the current value without tracking the dependency.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited