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