copyWith method

Data copyWith({
  1. String? channel,
  2. String? companyUid,
  3. String? connectionUid,
  4. String? contactUid,
  5. DateTime? createdAt,
  6. int? id,
  7. String? lastMessage,
  8. String? messageType,
  9. String? noOfUnseenMessages,
  10. String? status,
  11. String? uid,
  12. DateTime? updatedAt,
})

Implementation

Data copyWith({
  String? channel,
  String? companyUid,
  String? connectionUid,
  String? contactUid,
  DateTime? createdAt,
  int? id,
  String? lastMessage,
  String? messageType,
  String? noOfUnseenMessages,
  String? status,
  String? uid,
  DateTime? updatedAt,
}) {
  return Data(
    channel: channel ?? this.channel,
    companyUid: companyUid ?? this.companyUid,
    connectionUid: connectionUid ?? this.connectionUid,
    contactUid: contactUid ?? this.contactUid,
    createdAt: createdAt ?? this.createdAt,
    id: id ?? this.id,
    lastMessage: lastMessage ?? this.lastMessage,
    messageType: messageType ?? this.messageType,
    noOfUnseenMessages: noOfUnseenMessages ?? this.noOfUnseenMessages,
    status: status ?? this.status,
    uid: uid ?? this.uid,
    updatedAt: updatedAt ?? this.updatedAt,
  );
}