copyWith method
Implementation
Message copyWith({
String? id,
String? text,
String? imgUrl,
String? videoUrl,
String? audioUrl,
MessageType? type,
DateTime? timestamp,
bool? isMe,
}) {
return Message(
id: id ?? this.id,
text: text ?? this.text,
imgUrl: imgUrl ?? this.imgUrl,
videoUrl: videoUrl ?? this.videoUrl,
audioUrl: audioUrl ?? this.audioUrl,
type: type ?? this.type,
timestamp: timestamp ?? this.timestamp,
isMe: isMe ?? this.isMe,
);
}