ActionStatus class

Annotations

Constructors

ActionStatus({bool isDispatched = false, bool hasFinishedMethodBefore = false, bool hasFinishedMethodReduce = false, bool hasFinishedMethodAfter = false, bool isDispatchAborted = false, Object? originalError, Object? wrappedError})

Properties

hasFinishedMethodAfter bool
Is true if the after method finished executing. Note the after method should never throw any errors, but if it does the error will be swallowed and ignored. Is false if it has not yet finished executing.
final
hasFinishedMethodBefore bool
Is true when the before method finished executing normally. Is false if it has not yet finished executing or if it threw an error.
final
hasFinishedMethodReduce bool
Is true when the reduce method finished executing normally, returning a value. Is false if it has not yet finished executing or if it threw an error.
final
hashCode int
The hash code for this object.
no setteroverride
isAfterDone bool
no setter
isBeforeDone bool
no setter
isCompleted bool
Returns true only if the action has completed executing, either with or without errors. If this is true, the 'after' method already ran.
no setter
isCompletedFailed bool
Returns true only if the action has completed (the 'after' method already ran), but either the 'before' or the 'reduce' methods have thrown an error. If this is true, it indicates that the reducer could NOT complete, and could not return a value to change the state.
no setter
isCompletedOk bool
Returns true only if the action has completed, and none of the 'before' or 'reduce' methods have thrown an error. This indicates that the 'reduce' method completed and returned a result (even if the result was null). The 'after' method also already ran.
no setter
isDispatchAborted bool
Is true if the action was:
final
isDispatched bool
Returns true if the action was already dispatched. An action cannot be dispatched more than once, which means that you have to create a new action each time.
final
isFinished bool
no setter
isReduceDone bool
no setter
originalError Object?
Holds the error thrown by the action's before/reduce methods, if any. This may or may not be equal to the error thrown by the action, because the original error will still be processed by the action's wrapError and the globalWrapError. However, if originalError is non-null, it means the reducer did not finish running.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wrappedError Object?
Holds the error thrown by the action. This may or may not be the same as originalError, because any errors thrown by the action's before/reduce methods may still be changed or cancelled by the action's wrapError and the globalWrapError. This is the final error after all these wraps.
final

Methods

copy({bool? isDispatched, bool? hasFinishedMethodBefore, bool? hasFinishedMethodReduce, bool? hasFinishedMethodAfter, bool? isDispatchAborted, Object? originalError, Object? wrappedError}) ActionStatus
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override