Signal
Abstract Class
Signals can be observed by implementing the ISignalObserver interface and subscribing to the signal using Signal.AddObserver. StatefulWidgets may also access signals inside their build methods, which will automatically subscribe to the signal and rebuild the widget when the signal changes.
Properties
IsDisposed: bool
Static Methods
Computed<T>(computeFunc: Func <T>): ComputedSignal <T>
Creates a signal that recomputes its value whenever any of its dependencies change.
RemarksThe current value of a signal will be invalidated on Signal.NotifyDirty and only recomputed when accessed.
Parameters
computeFunc:
Func <T> - A function that computes the value of the signal based on its dependencies.
This function will be called whenever any of the signal's dependencies change.Value<T>(initialValue: T, equality: bool): ValueSignal <T>
Creates a signal that holds a single value.
Parameters
initialValue:
T - The initial value of the signal. Defaults to the default value of T.Instance Methods
AddObserver(onChanged: Action, fireImmediately: bool): I Disposable
NotifyDirty(): void
NotifyObservers(): void
AddObserver(observer: I Signal Observer): bool
Dispose(): void
RemoveObserver(observer: I Signal Observer): bool
Inherited Members
Extension Methods
To Diagnostics Node SafeDescribe IdentityShort HashTo String Nullable