value property

T get value
inherited

Gets the current value and establishes a reactive dependency.

When accessed within a reactive context (Effect, Computed, etc.), the context will be notified when this value changes.

Example:

final count = Signal(0);
final doubled = Computed(() => count.value * 2);

Implementation

T get value;
set value (T value)

Sets a new value and notifies subscribers if changed.

Automatically notifies all subscribers when the value changes.

Example:

final count = Signal(0);
count.value = 10; // Notifies subscribers

Implementation

set value(T value);