cubix library

Classes

ActionBase<TResult, TState>
This is base class for action. An action is where to put logic to process individual task. The action supports sync/async logic
AsyncAction<TResult, TState>
An action that contains async logic
CallbackGroup
create a gorup of callback. Once call() method is invoked, all callbacks in the group will be invoked as well
CancelToken
CubitWrapper<TState>
Cubix<TState>
CubixState<TState>
Dependency
DependencyResolver
An implementation of dependency injection
Dispatcher
A class that contains action dispatching info and methods to controller dispatching flow
IDependency
InitContext
SyncAction<TResult, TState>
VoidAction<TState extends Object?>
VoidAsyncAction<TState>
VoidCubix
VoidSyncAction<TState>

Mixins

CubixMixin<TState>

Functions

cancelAll<TAction extends Object?>([bool predicate(ActionBase)?]) Rule
cancel all action rule
debounce([Duration duration = Duration.zero]) Rule
debounce action dispatching in specified duration
droppable() Rule
drop current dispatching if there is any instance of current action is dispatching
sequential() Rule
dispatch actions sequentially
throttle(Duration duration) Rule

Typedefs

ActionData = Map<Object?, Object?>
CreateCubix<T extends Cubix> = T Function()
ExtraData = Map<Object, Object?>
Rule = void Function(Dispatcher dispatcher, VoidCallback next)
VoidCallback = void Function()