copyWith method
Implementation
ChatMessage copyWith({
String? text,
String? imageUrl,
String? imagePath,
String? audioUrl,
String? audioPath,
bool? isSender,
DateTime? createdAt,
}) {
return ChatMessage(
text: text ?? this.text,
imageUrl: imageUrl ?? this.imageUrl,
imagePath: imagePath ?? this.imagePath,
audioUrl: audioUrl ?? this.audioUrl,
audioPath: audioPath ?? this.audioPath,
isSender: isSender ?? this.isSender,
createdAt: createdAt ?? this.createdAt,
);
}