copyWith method
Allows you to create a new instance of the MetricEvent with updated values.
Implementation
MetricEvent copyWith({
String? projectId,
DateTime? occurredAt,
MetricPayload? payload,
}) {
return MetricEvent(
occurredAt: occurredAt ?? this.occurredAt,
payload: payload ?? this.payload,
);
}