copyWith method

LogEventApiDto copyWith({
  1. int? id,
  2. String? serviceName,
  3. String? serviceInstance,
  4. LogLevel? level,
  5. DateTime? timestamp,
  6. String? message,
  7. String? sender,
  8. bool nullSender = false,
  9. Map<String, String>? path,
  10. 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,
  );
}