copyWith method
Creates a copy of this connection with the given fields replaced.
Returns a new Connection instance with the same values as this one, except for the fields explicitly provided.
Implementation
Connection copyWith({
String? id,
String? connectionString,
DateTime? createdAt,
bool? isActive,
}) {
return Connection(
id: id ?? this.id,
connectionString: connectionString ?? this.connectionString,
createdAt: createdAt ?? this.createdAt,
isActive: isActive ?? this.isActive,
);
}