copyWith abstract method
A copy with some fields replaced. A null argument keeps the current value, so a correlation id cannot be cleared with this method.
Implementation
EventDTO<T> copyWith({
T? data,
EventKey<T>? key,
Map<String, String>? arguments,
String? correlationId,
});