deex library

Classes

CustomStatus<T>
DeepCollectionEquality
Deex
The simplest reactive widget in Deex.
DeexConsumer<S extends DeexStore>
A widget that listens to a DeexStore and rebuilds when the state changes. It combines both a builder and a listener callback.
DeexConsumerState<S extends DeexStore>
DeexElement
DeexElement is a class that extends StatelessElement and mixes in StatelessObserverComponent
DeexError
Error class for Deex errors.
DeexInterface<T>
This class is the foundation for all reactive (Rx) classes that makes so powerful. This interface is the contract that _RxImpl
DeexListenable<T>
DeexNotifier<T>
DeexNotifier has a native status and state implementation, with the Deex Lifecycle
DeexService
The DeexService is a class that can be used to manage the lifecycle of
DeexStatelessWidget
A StatelessWidget that can listen to reactive changes.
DeexStore
DeexValue<T extends DeexInterface>
Similar to Deex, but manages a local state. Pass the initial data in constructor. Useful for simple local states, like toggles, visibility, themes, button states, etc. Sample: DeexValue((data) => Switch( value: data.value, onChanged: (flag) => data.value = flag, ), false.obs, ),
DefaultEquality<E>
EmptyStatus<T>
Engine
ErrorStatus<T, S>
FastList<T>
FullLifeCycleController
A controller with super lifecycles (including native lifecycles)
IdentityEquality<E>
Equality of objects that compares only the identity of the objects.
IEquality<E>
A generic equality relation on objects.
IterableEquality<E>
Equality on iterables.
ListEquality<E>
Equality on lists.
ListNotifier
A ListNotifier with both single and group listener support.
ListNotifierGroup
A notifier with a group of listeners identified by an ID.
ListNotifierSingle
A Notifier with single listeners
LoadingStatus<T>
MapEquality<K, V>
Equality on maps.
MiniStream<T>
MiniSubscription<T>
Node<T>
Notifier
Singleton class that manages notifiers.
NotifyData
Class representing the data for notifications.
Observer
It's a experimental feature
ObxError
Rx<T>
Foundation class used for custom Types outside the common native Dart types. For example, any custom "Model" class, like User().obs will use Rx as wrapper.
RxBool
RxDouble
RxInt
RxList<E>
Create a list similar to List<T>
RxMap<K, V>
Rxn<T>
RxnBool
RxnDouble
RxnInt
RxnNum
RxnString
Rx class for String Type.
RxNum
RxSet<E>
RxStatus<T>
RxStore
A clean store to be used with only Rx variables
RxString
Rx class for String Type.
RxWidget
The RxWidget is the base for all Deex reactive widgets
SetEquality<E>
Equality of sets.
StateController<T>
A recommended way to use Deex with Future fetching
SuccessStatus<T>
SuperController<T>
A controller with super lifecycles (including native lifecycles) and StateMixins
UnorderedIterableEquality<E>
Equality of the elements of two iterables without considering order.
Value<T>
ValueBuilder<T>
Manages a local state like ObxValue, but uses a callback instead of a Rx value.
ValueBuilderState<T>
Manages local state like ObxValue, but uses a callback instead of an Rx value.
Worker
Workers

Mixins

DeexLifeCycleMixin
The DeexLifeCycle
DeexObjectMixin<T>
global object that registers against Deex, and allows the reactivity of those Widgets and Rx values.
Equality
FullLifeCycleMixin
ListNotifierGroupMixin
This mixin adds group listener support to Listenable.
ListNotifierSingleMixin
This mixin adds addListener, removeListener, and containsListener implementation to Listenable.
ScrollMixin
this mixin allow to fetch data when the scroll is at the bottom or on the top
StatelessObserverComponent
A component that can track changes in a reactive variable
StateMixin<T>

Extensions

BoolExtension on bool
DoubleExtension on double
IntExtension on int
ListExtension on List<E>
MapExtension on Map<K, V>
RxBoolExt on Rx<bool>
RxDoubleExt on Rx<double>
RxIntExt on Rx<int>
RxnBoolExt on Rx<bool?>
RxnDoubleExt on Rx<double?>
RxnIntExt on Rx<int?>
RxnNumExt on Rx<T?>
RxnStringExt on Rx<String?>
RxNumExt on Rx<T>
RxStringExt on Rx<String>
RxT on T
RxTnew on Object
This method will replace the old .obs method. It's a breaking change, but it is essential to avoid conflicts with the new dart 3 features. T will be inferred by contextual type inference rather than the extension type.
SetExtension on Set<E>
StateExt on StateMixin<T>
StatusDataExt on RxStatus<T>
StringExtension on String

Functions

ambiguate<T>(T? value) → T?
This allows a value of type T or T? to be treated as a value of type T?.
debounce<T>(DeexListenable<T> listener, WorkerCallback<T> callback, {Duration? time, Function? onError, void onDone()?, bool? cancelOnError}) Worker
debounce is similar to interval, but sends the last value. Useful for Anti DDos, every time the user stops typing for 1 second, for instance. When listener emits the last "value", when time hits, it calls callback with the last "value" emitted.
ever<T>(DeexListenable<T> listener, WorkerCallback<T> callback, {dynamic condition = true, Function? onError, void onDone()?, bool? cancelOnError}) Worker
Called every time listener changes. As long as the condition returns true.
everAll(List<DeexInterface> listeners, WorkerCallback callback, {dynamic condition = true, Function? onError, void onDone()?, bool? cancelOnError}) Worker
Similar to ever, but takes a list of listeners, the condition for the callback is common to all listeners, and the callback is executed to each one of them. The Worker is common to all, so worker.dispose() will cancel all streams.
interval<T>(DeexListenable<T> listener, WorkerCallback<T> callback, {Duration time = const Duration(seconds: 1), dynamic condition = true, Function? onError, void onDone()?, bool? cancelOnError}) Worker
Ignore all changes in listener during time (1 sec by default) or until condition is met (can be a bool expression or a bool Function()), It brings the 1st "value" since the period of time, so if you click a counter button 3 times in 1 sec, it will show you "1" (after 1 sec of the first press) click counter 3 times in 1 sec, it will show you "4" (after 1 sec) click counter 2 times in 1 sec, it will show you "7" (after 1 sec).
once<T>(DeexListenable<T> listener, WorkerCallback<T> callback, {dynamic condition = true, Function? onError, void onDone()?, bool? cancelOnError}) Worker
once() will execute only 1 time when condition is met and cancel the subscription to the listener stream right after that. condition defines when callback is called, and can be a bool or a bool Function().

Typedefs

Callback = void Function()
Condition = bool Function()
DeexBuilder<S> = Widget Function(BuildContext context, S state)
A function that returns a widget based on the BuildContext and the DeexStore state.
DeexListener<S> = void Function(BuildContext context, S state)
A function that performs side effects based on the BuildContext and the DeexStore state.
DeexStateUpdate = void Function()
Replaces StateSetter, returning if the Widget is mounted for extra validation.
Disposer = void Function()
This callback removes the listener added by the addListener function.
FuturizeCallback<T> = Future<T> Function(VoidCallback fn)
NotifierBuilder<T> = Widget Function(T state)
OnData<T> = void Function(T data)
ValueBuilderBuilder<T> = Widget Function(T snapshot, ValueBuilderUpdateCallback<T> updater)
Defines a callback that takes a value of generic type T and an updater, and returns a Widget
ValueBuilderUpdateCallback<T> = void Function(T snapshot)
Defines a callback that takes a value of generic type T and returns nothing
ValueUpdater<T> = T Function()
VoidCallback = void Function()
WidgetCallback = Widget Function()
WorkerCallback<T> = dynamic Function(T callback)