solidart library

Support for doing something awesome.

More dartdocs go here.

Classes

Effect<T>
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.
ReadSignal<T>
A read-only Signal.
Resource<ResultType>
Resources are special Signals 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 ResourceValue in error state.
ResourceLoading<T>
Creates an ResourceValue in loading state.
ResourceReady<T>
Creates an ResourceValue in ready state with a data.
ResourceUnresolved<T>
Creates an ResourceValue in unresolved state.
ResourceValue<T>
Manages all the different states of a Resource:
Signal<T>
Signals
SignalBase<T>
The base of a signal.
SignalOptions<T>
Signal options which increase its customization

Enums

EffectState
The state of the effect

Extensions

ResourceExtensions on ResourceValue<T>
Some useful extension available on any ResourceValue.
ToogleBoolSignal on Signal<bool>
Adds the toggle method to boolean signals

Functions

createEffect<T>(void callback(), {required List<SignalBase<T>> signals, bool fireImmediately = false}) Effect<T>
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<ResultType>({Future<ResultType> fetcher()?, Stream<ResultType>? stream, SignalBase? source}) Resource<ResultType>
Resources are special Signals 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

ReadableSignal<T> = ReadSignal<T>
A read-only Signal.
ValueComparator<T> = bool Function(T a, T b)
A custom comparator function