oref
library
Classes
-
AsyncData<T>
-
-
Computed<T>
-
A reactive computed value that derives from other signals.
-
Effect
-
A reactive effect that runs side effects in response to signal changes.
-
EffectScope
-
A scope that manages a collection of effects.
-
Reactive<T extends Reactive<T>>
-
Reactive mixin class that provides a signal-based reactive system.
-
ReactiveList<T>
-
A reactive List implementation.
-
ReactiveMap<K, V>
-
A reactive map that tracks changes to its source map.
-
ReactiveSet<T>
-
A reactive set that tracks changes to its elements.
-
Signal<T>
-
A reactive signal that holds a value of type
T.
-
SignalBuilder
-
A SignalBuilder is a widget that builds a widget tree based on a signal/computed.
-
WritableComputed<T>
-
Factory method for creating a writable computed signal.
-
WritableSignal<T>
-
A reactive signal that can be both read and written.
Functions
-
batch<T>(T getter())
→ T
-
Batch execution of signals.
-
computed<T>(BuildContext? context, T getter(T? previousValue))
→ Computed<T>
-
-
effect(BuildContext? context, void callback(), {bool detach = false})
→ Effect
-
Creates a reactive effect that automatically tracks its dependencies and re-runs when they change.
-
effectScope(BuildContext? context, void callback(), {bool detach = false})
→ EffectScope
-
Creates a new effect scope that can be used to group and manage multiple effects.
-
onEffectCleanup(void callback(), {bool failSilently = false})
→ void
-
-
onEffectDispose(void callback(), {bool failSilently = false})
→ void
-
-
onScopeDispose(void callback(), {bool failSilently = false})
→ void
-
-
resetMemoizedCursor(BuildContext context)
→ void
-
Reset memoized cursor.
-
signal<T>(BuildContext? context, T initialValue)
→ WritableSignal<T>
-
Creates a reactive signal with an initial value.
-
untrack<T>(T getter())
→ T
-
Untracks the current subscription and returns the result of the getter.
-
useAsyncData<T>(BuildContext? context, ValueGetter<FutureOr<T>> handler, {ValueGetter<T?>? defaults})
→ AsyncData<T>
-
-
useMemoized<T>(BuildContext context, T factory())
→ T
-
Memoizes a value for the given context.
-
useWidgetEffect(BuildContext context)
→ Effect
-
Use a
ReactiveEffect to create a widget effect for a given BuildContext.
-
useWidgetScope(BuildContext context)
→ EffectScope
-
-
watch<T>(BuildContext context, T getter())
→ T
-
Watch a signal in a widget.
-
writableComputed<T>(BuildContext? context, {required T get(T? cached), required void set(T value)})
→ WritableComputed<T>
-
Factory method for creating a writable computed signal.