copyWith method

MetricEvent copyWith({
  1. String? projectId,
  2. DateTime? occurredAt,
  3. MetricPayload? payload,
})

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