AggregateState<TValue extends Object> class abstract

AggregateState base class.

Constructors

AggregateState(TValue value, [int? version])

Properties

expectedVersion ExpectedStreamVersion
Get ExpectedStreamVersion on next AggregateStore.save
no setter
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → TValue
Get state value of type TValue
final
version int
The current version of AggregateState. Is incremented when an event is handled.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on<TEvent extends Object>(AggregateEventHandlerCallback<TEvent, TValue, AggregateState<TValue>> handler) → void
Register handler for given event
toString() String
A string representation of this object.
override
when<TEvent extends Object, TState extends AggregateState<TValue>>(TEvent event) → TState
Handle event. Returns value after event is handled. If given event is not handled by this state, original value is returned.

Operators

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