flutter_reactter library

Classes

Args<A>
A class that represents an argument
Args1<A>
A class that represents an argument
Args2<A, A2>
A class that represents a set of two arguments.
Args3<A, A2, A3>
A class that represents a set of three arguments.
AsyncMemoSafe<T, A>
It's a memoization interceptor that prevents saving in cache if the Future calculation function throws an error when executed.
DispatchEffect
LifecycleObserver
It's a mixin that provides a set of methods that can be used to observe the lifecycle of an instance.
Memo<T, A>
A class callable that is used for memoizing values(T) returned by a calcutate function(calculateValue).
MemoInterceptor<T, A>
It allows for intercepting the memoizing function calls.
MemoInterceptors<T, A>
It allows multiple memoization interceptors to be used together.
MemoInterceptorWrapper<T, A>
It´s a wrapper for a memoized function that allows you to define callbacks for initialization, successful completion, error handling, and finishing.
Obj<T>
A base-class that store a value of T.
ObjBase<T>
ReactterAction<T>
A representation of an event that describes something that happened in the application.
ReactterActionCallable<T, P>
A abstract class of ReactterAction that may be called using a call method.
ReactterComponent<T extends Object>
A abstract StatelessWidget class that provides ReactterProvider features, whose instance of T type defined is exposing trough render method.
ReactterConsumer<T extends Object?>
A StatelessWidget that allows to obtain an instance of T type from the closest ancestor ReactterProvider and passes the instance to builder.
ReactterHook
An abstract-class that provides the functionality of ReactterState.
ReactterInstance<T>
Represents an instance of the Reactter framework.
ReactterInterface
A class that represents the interface for Reactter.
ReactterProvider<T extends Object?>
A Widget that serves as a conduit for injecting an instance of T type into the widget tree. e.g.:
ReactterProviderElement<T extends Object?>
ReactterProviders
A StatelessWidget that allows to use multiple ReactterProvider as nested way.
ReactterProvidersElement
ReactterScope
An InheritedWidget that provides a scope for managing state and re-rendering child widgets.
ReactterScopeElement
ReactterSelector<T extends Object?, V>
A StatelessWidget similar to ReactterConsumer but allowing to control the rebuilding of widget tree by selecting the ReactterStates, and a computed value.
ReactterState
A abstract class that represents a stare in Reactter.
ReactterStateImpl
An implementation of the ReactterState.
ReactterWatcher
A StatefulWidget that listens for Signals and re-build when any Signal is changed.
Signal<T>
A base-class that store a value of T and notify the listeners when the value is updated.
TemporaryCacheMemo<T, A>
It's a memoization interceptor that removes memoized values from the cache after a specified duration.
UseAsyncState<T>
A ReactteHook that manages the state as async way.
UseAsyncStateArg<T, A>
A ReactteHook that manages the state as async way.
UseCompute<T>
A ReactterHook that allows to compute a value using a predetermined compute function and a list of state dependencies, and which automatically updates the computed value if a dependency changes.
UseEffect
A ReactterHook that manages side-effect.
UseInstance<T extends Object>
A ReactterHook that allows to manages an instance of T with/without id.
UseReducer<T>
A ReactterHook that manages state using reducer method.
UseState<T>
A ReactterHook that manages a state.

Enums

InstanceManageMode
Represents different ways for managing instances.
Lifecycle
SignalEvent
This enumeration is used to represent different events that can occur when getting or setting the value of a Signal object.
UseAsyncStateStatus

Properties

Reactter ReactterInterface
final

Functions

defaultLogWriterCallback(String value, {Object? error, LogLevel? level = LogLevel.info}) → void
getType<T>() Type
Returns the type of the generic parameter T.

Typedefs

ArgsX2<T> = Args2<T, T>
ArgsX3<T> = Args3<T, T, T>
AsyncFunction<T> = FutureOr<T> Function()
to represent an async function without arguments
AsyncFunctionArg<T, A> = Future<T> Function(A arg)
to represent an async function with arguments
CallbackEvent<T extends Object?, P> = dynamic Function(T? inst, P param)
to represent an event callback
ChildBuilder = Widget Function(BuildContext context, Widget? child)
A builder that builds a widget given a child.
FunctionArg<T, A> = T Function(A arg)
to represent a function with arguments
FunctionArgMemo<T, A> = void Function(Memo<T, A> memo, A arg)
FunctionErrorMemo<T, A> = void Function(Memo<T, A> memo, A arg, Object error)
FunctionMemo<T, A> = T Function(A, {bool overrideCache})
FunctionValueMemo<T, A> = void Function(Memo<T, A> memo, A arg, T value, bool fromCache)
InstanceBuilder<T> = T Function()
A function to generate the instance of T
InstanceChildBuilder<T> = Widget Function(BuildContext context, T inst, Widget? child)
This function type can be used as a callback to build a widget tree based on an instance of T type.
InstanceValueChildBuilder<T, V> = Widget Function(BuildContext context, T inst, V value, Widget? child)
This function type can be used as a callback to build a widget tree based on an instance of T type and a value of V type.
ListenStates<T> = List<ReactterState> Function(T instance)
This function type can be used as a callback to listen to the states of an instance of T type and return a list of ReactterState objects associated with that instance.
LogWriterCallback = void Function(String text, {Object error, LogLevel level})
Reactter.log type
Reducer<T> = T Function(T state, ReactterAction action)
to represent a reducer method
Select = S Function<S extends ReactterState>(S state)
This function type can be used to watch a state.
Selector<T, V> = V Function(T inst, Select select)
This function type takes an argument of T type and a Select function, and returns a value of R type. This function type can be used to compute a value based on the provided arguments.
SelectorAspect<T> = bool Function(InheritedElement inheritedElement)
This function type can be used as a callback to determine whether a specific aspect of an inherited widget should be selected or not.
WhenErrorReturn<R> = R Function(Object? value)
UseAsyncState.when's parameter type for representing a error
WhenValueReturn<T, R> = R Function(T value)
UseAsyncState.when's parameter type for representing a value
WithId = String
Identifies a ReactterProvider with id.
WithoutId = Null
Identifies a ReactterProvider without id.

Exceptions / Errors

ReactterInstanceNotFoundException
The error that will be thrown if ReactterProvider.contextOf fails to find the instance from ancestor of the BuildContext used.
ReactterScopeNotFoundException