copyWith method
Allows you to create a new instance of the MetricPayload with updated values.
Implementation
MetricPayload copyWith({
String? sourceEventId,
String? eventName,
DateTime? occurredAt,
String? userId,
String? anonymousId,
Map<String, String>? properties,
}) {
return MetricPayload(
sourceEventId: sourceEventId ?? this.sourceEventId,
eventName: eventName ?? this.eventName,
userId: userId ?? this.userId,
anonymousId: anonymousId ?? this.anonymousId,
properties: properties ?? this.properties,
systemProperties: systemProperties,
);
}