copyWith method
Creates a copy with updated fields.
Implementation
PinnedEvent copyWith({
String? id,
String? messageId,
String? roomId,
String? pinnedBy,
DateTime? pinnedAt,
DateTime? unpinnedAt,
}) {
return PinnedEvent(
id: id ?? this.id,
messageId: messageId ?? this.messageId,
roomId: roomId ?? this.roomId,
pinnedBy: pinnedBy ?? this.pinnedBy,
pinnedAt: pinnedAt ?? this.pinnedAt,
unpinnedAt: unpinnedAt ?? this.unpinnedAt,
);
}