copyWith method
Implementation
StructuredState<TState, TEvent> copyWith({
TState? state,
TEvent? lastEvent,
DateTime? timestamp,
List<TEvent>? eventHistory,
}) {
return StructuredState<TState, TEvent>(
state: state ?? this.state,
lastEvent: lastEvent ?? this.lastEvent,
timestamp: timestamp ?? this.timestamp,
eventHistory: eventHistory ?? this.eventHistory,
);
}