flutter_solidart library

Flutter solidart library.

Classes

Computed<T>
A special Signal that notifies only whenever the selected values change.
DualSignalBuilder<T, U>
The same as SignalBuilder but reacts to two signals.
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.
Provider<T>
A Provider that manages the lifecycle of the value it provides by
ReadSignal<T>
A read-only Signal.
Resource<T>
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.
ResourceBuilder<T>
The ResourceBuilder widget makes the consumption of a Resource extremely simple. It takes a resource and a builder fired any time the resource state changes.
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.
Show<T extends bool>
Conditionally render its builder or an optional fallback component based on the when evaluation.
Signal<T>
Signals
SignalBase<T>
The base of a signal.
SignalBuilder<T>
Reacts to the signal calling the builder each time.
SignalOptions<T>
Signal options which increase its customization
Solid
Provides providers to descendants.
SolidartConfig
The global configuration of the reactive system.
SolidartObserver
An object that listens to the changes of the reactive system.
SolidElement<T>
The base class of a solid provider
SolidState
The state of the Solid widget
TripleSignalBuilder<T, U, R>
The same as SignalBuilder but reacts to three signals.

Enums

DevToolsEventType
The type of the event emitted to the devtools

Extensions

ResourceExtensions on ResourceState<T>
Some useful extension available on any ResourceState.
SignalToValueNotifier on SignalBase<T>
Converts a SignalBase into a ValueNotifier;
SolidExtensions on BuildContext
Convenience extensions to interact with the Solid InheritedModel.
ToggleBoolSignal on Signal<bool>
Adds the toggle method to boolean signals
ValueNotifierToSignal on ValueNotifier<T>
Converts a ValueNotifier into a Signal;

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 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

Create<T> = T Function()
A function that creates an object of type T.
DisposeEffect = void Function()
Dispose function
DisposeObservation = void Function()
A callback that stops an observation when called
DisposeValue<T> = void Function(T value)
A function that disposes an object of type T.
DualValueWidgetBuilder<T, U> = Widget Function(BuildContext context, T firstValue, U secondValue, Widget? child)
The builder function for a DualSignalBuilder
Identifier = Object
The idenfifier of the element.
ReadableSignal<T> = ReadSignal<T>
A read-only Signal.
ResourceWidgetBuilder<T> = Widget Function(BuildContext context, ResourceState<T> resourceState)
Builder function for a Resource.
SolidProvider<T> = Provider<T>
A Provider that manages the lifecycle of the value it provides by
TripleValueWidgetBuilder<T, U, R> = Widget Function(BuildContext context, T firstValue, U secondValue, R thirdValue, Widget? child)
The builder function for a TripleSignalBuilder

Exceptions / Errors

ProviderDynamicError
Error thrown when the Provider has a dynamic Type.
ProviderError<T>
Error thrown when the Provider of type id cannot be found
ProviderMultipleProviderOfSameTypeError
Error thrown when there are multiple providers of the same providerType Type in the same Solid widget
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