copyWith method

SearchConversationDatum copyWith({
  1. int? id,
  2. String? companyId,
  3. String? socialAccountId,
  4. dynamic contactId,
  5. String? senderId,
  6. String? senderName,
  7. String? senderPhoto,
  8. String? receiverId,
  9. String? receiverName,
  10. String? receiverPhoto,
  11. String? lastMessage,
  12. String? lastMessageType,
  13. String? profilePhoto,
  14. String? status,
  15. DateTime? createdAt,
  16. DateTime? updatedAt,
})

Implementation

SearchConversationDatum copyWith({
  int? id,
  String? companyId,
  String? socialAccountId,
  dynamic contactId,
  String? senderId,
  String? senderName,
  String? senderPhoto,
  String? receiverId,
  String? receiverName,
  String? receiverPhoto,
  String? lastMessage,
  String? lastMessageType,
  String? profilePhoto,
  String? status,
  DateTime? createdAt,
  DateTime? updatedAt,
}) {
  return SearchConversationDatum(
    id: id ?? this.id,
    companyId: companyId ?? this.companyId,
    socialAccountId: socialAccountId ?? this.socialAccountId,
    contactId: contactId ?? this.contactId,
    senderId: senderId ?? this.senderId,
    senderName: senderName ?? this.senderName,
    senderPhoto: senderPhoto ?? this.senderPhoto,
    receiverId: receiverId ?? this.receiverId,
    receiverName: receiverName ?? this.receiverName,
    receiverPhoto: receiverPhoto ?? this.receiverPhoto,
    lastMessage: lastMessage ?? this.lastMessage,
    lastMessageType: lastMessageType ?? this.lastMessageType,
    profilePhoto: profilePhoto ?? this.profilePhoto,
    status: status ?? this.status,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}