copyWith method
LogEventApiDto
copyWith(
{ - int? id,
- String? serviceName,
- String? serviceInstance,
- LogLevel? level,
- DateTime? timestamp,
- String? message,
- String? sender,
- bool nullSender = false,
- Map<String, String>? path,
- Map<String, dynamic>? meta,
})
Implementation
LogEventApiDto copyWith({
int? id,
String? serviceName,
String? serviceInstance,
LogLevel? level,
DateTime? timestamp,
String? message,
String? sender,
bool nullSender = false,
Map<String, String>? path,
Map<String, dynamic>? meta,
}) {
return LogEventApiDto(
id: id ?? this.id,
serviceName: serviceName ?? this.serviceName,
serviceInstance: serviceInstance ?? this.serviceInstance,
level: level ?? this.level,
timestamp: timestamp ?? this.timestamp,
message: message ?? this.message,
sender: nullSender ? null : (sender ?? this.sender),
path: path ?? this.path,
meta: meta ?? this.meta,
);
}