copyWith abstract method

EventDTO<T> copyWith({
  1. T? data,
  2. EventKey<T>? key,
  3. Map<String, String>? arguments,
  4. String? correlationId,
})

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,
});