solidart library
Support for doing something awesome.
More dartdocs go here.
Classes
-
Computed<
T> - A special Signal that notifies only whenever the selected values change.
- Effect
- Signals are trackable values, but they are only one half of the equation. To complement those are observers that can be updated by those trackable values. An effect is one such observer; it runs a side effect that depends on signals.
- EffectOptions
- The effect options
-
ListSignal<
E> -
ListSignal
makes easier interacting with lists in a reactive context. -
MapSignal<
K, V> -
MapSignal
makes easier interacting with maps in a reactive context. -
ReadSignal<
T> - A read-only Signal.
-
Resource<
T> -
Resources
are specialSignal
s designed specifically to handle Async loading. Their purpose is wrap async values in a way that makes them easy to interact with handling the common states of a future data, error and loading. -
ResourceError<
T> - Creates an ResourceState in error state.
-
ResourceLoading<
T> - Creates an ResourceState in loading state.
- ResourceOptions
- {@macro signaloptions}
-
ResourceReady<
T> - Creates an ResourceState in ready state with a data.
-
ResourceSelector<
Input, Output> - The selector function allows filtering the Resource's data by reading only the properties that you care about.
-
ResourceState<
T> - Manages all the different states of a Resource:
-
SetSignal<
E> -
SetSignal
makes easier interacting with sets in a reactive context. -
Signal<
T> - Signals
-
SignalBase<
T> - The base of a signal.
-
SignalOptions<
T> - Signal options which increase its customization
- SolidartConfig
- The global configuration of the reactive system.
- SolidartObserver
- An object that listens to the changes of the reactive system.
Enums
- DevToolsEventType
- The type of the event emitted to the devtools
Extensions
-
ResourceExtensions
on ResourceState<
T> - Some useful extension available on any ResourceState.
-
ToggleBoolSignal
on Signal<
bool> - Adds the toggle method to boolean signals
Functions
-
createComputed<
T> (T selector(), {SignalOptions< T> ? options}) → Computed<T> - A special Signal that notifies only whenever the selected values change.
-
createEffect(
void callback(DisposeEffect dispose), {ErrorCallback? onError, EffectOptions? options}) → DisposeEffect - Signals are trackable values, but they are only one half of the equation. To complement those are observers that can be updated by those trackable values. An effect is one such observer; it runs a side effect that depends on signals.
-
createResource<
T> ({Future< T> fetcher()?, Stream<T> stream()?, SignalBase? source, ResourceOptions? options}) → Resource<T> -
Resources
are specialSignal
s designed specifically to handle Async loading. Their purpose is wrap async values in a way that makes them easy to interact with handling the common states of a future data, error and loading. -
createSignal<
T> (T value, {SignalOptions< T> ? options}) → Signal<T> - Signals
Typedefs
- DisposeEffect = void Function()
- Dispose function
- DisposeObservation = void Function()
- A callback that stops an observation when called
-
ReadableSignal<
T> = ReadSignal< T> - A read-only Signal.
Exceptions / Errors
- SolidartCaughtException
- This captures the stack trace when user-land code throws an exception
- SolidartException
- An Exception class to capture Solidart specific exceptions
- SolidartReactionException
-
This exception would be fired when an reaction has a cycle and does
not stabilize in
ReactiveConfig.maxIterations
iterations