Cubix<TState> class
abstract
- Inheritance
-
- Object
- Dependency
- Cubix
- Implementers
Constructors
-
Cubix(TState initialState, [CubitWrapper<
TState> create(TState initialState)?])
Properties
-
cubit
→ CubitWrapper<
TState> -
final
-
dispatchers
→ List<
Dispatcher> -
no setter
- disposed → bool
-
no setter
- error → Object?
-
return last dispatching error
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Object?
-
no setteroverride
- resolvedType → Type
-
no setteroverride
- resolver → DependencyResolver
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ TState
-
set state
getter/setter pair
Methods
-
bindAction(
ActionBase action, {CancelToken? cancelToken}) → Dispatcher -
bindDispatcher(
Dispatcher dispatcher) → void -
cancel(
) → void - cancel all dispatching actions
-
dispatch<
TResult extends Object?> (ActionBase< TResult, TState> action, {CancelToken? cancelToken}) → TResult - dispatch specified action and return the result of action body
-
dispatchGeneric(
ActionBase action, {CancelToken? cancelToken}) → void -
dispose(
) → void -
override
-
emit(
Object event) → void -
inject(
DependencyResolver resolver, {Object? key, Type? resolvedType}) → void -
override
-
loading<
TAction extends Object?> ([bool predicate(ActionBase)?]) → bool - return true if there is any action dispatching
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
Change< TState> change) → void -
onDispatch(
ActionBase action) → void - this method will be called whenever action dispatches
-
onDispose(
) → void -
onError(
Object error, StackTrace stackTrace) → void -
onInit(
) → void -
remove(
) → void -
resolve<
T extends IDependency> (T create(), {Object? family}) → T -
toString(
) → String -
A string representation of this object.
inherited
-
wait(
) → Future< TState> -
watch(
List< Cubix> cubixes, void syncFn(CancelToken cancelToken)) → VoidCallback -
when(
void callback(Object action)) → VoidCallback
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited