copyWith method
Creates a copy of this snapshot with the given fields replaced with new values.
All fields are optional. If a field is not provided, the original value is kept.
Implementation
ChatReplySnapshot copyWith({
String? messageId,
String? authorId,
String? authorDisplayName,
String? authorAvatarUrl,
String? textPreview,
DateTime? createdAt,
}) {
return ChatReplySnapshot(
messageId: messageId ?? this.messageId,
authorId: authorId ?? this.authorId,
authorDisplayName: authorDisplayName ?? this.authorDisplayName,
authorAvatarUrl: authorAvatarUrl ?? this.authorAvatarUrl,
textPreview: textPreview ?? this.textPreview,
createdAt: createdAt ?? this.createdAt,
);
}